Skip to content

Commit

Permalink
Improve precompilation
Browse files Browse the repository at this point in the history
Provide a default implementation of wavplay(data, fs) that uses the
@warn macro.

This might help with pull request #70.
  • Loading branch information
dancasimiro committed Nov 4, 2018
1 parent ec9205a commit 73ccd48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/WAV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand All @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions src/wavplay-unsupported.jl

This file was deleted.

0 comments on commit 73ccd48

Please sign in to comment.