From 73ccd481c2486fb296b9a6834b9567bd9a41de67 Mon Sep 17 00:00:00 2001 From: "Daniel C. Casimiro" Date: Sun, 4 Nov 2018 12:58:30 -0500 Subject: [PATCH] Improve precompilation Provide a default implementation of wavplay(data, fs) that uses the @warn macro. This might help with pull request #70. --- src/WAV.jl | 5 +++-- src/wavplay-unsupported.jl | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 src/wavplay-unsupported.jl diff --git a/src/WAV.jl b/src/WAV.jl index 8fc7275..f80ce26 100644 --- a/src/WAV.jl +++ b/src/WAV.jl @@ -8,6 +8,7 @@ export isextensible, isformat, bits_per_sample export WAVE_FORMAT_PCM, WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_ALAW, WAVE_FORMAT_MULAW import Libdl using FileIO +using Logging function __init__() module_dir = dirname(@__FILE__) @@ -16,13 +17,13 @@ function __init__() elseif Libdl.find_library(["AudioToolbox"], ["/System/Library/Frameworks/AudioToolbox.framework/Versions/A"]) != "" include(joinpath(module_dir, "wavplay-audioqueue.jl")) - else - include(joinpath(module_dir, "wavplay-unsupported.jl")) end + nothing end include("AudioDisplay.jl") include("WAVChunk.jl") +wavplay(data, fs) = @warn "wavplay is not currently implemented on $(Sys.KERNEL)" wavplay(fname) = wavplay(wavread(fname)[1:2]...) # The WAV specification states that numbers are written to disk in little endian form. diff --git a/src/wavplay-unsupported.jl b/src/wavplay-unsupported.jl deleted file mode 100644 index caf1132..0000000 --- a/src/wavplay-unsupported.jl +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: julia; -*- -module WAVPlay -import ..wavplay -wavplay(data, fs) = warn("wavplay is not currently implemented on $(Sys.KERNEL)") -end # module