Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wavwrite error #4

Closed
sam81 opened this issue Oct 25, 2013 · 2 comments
Closed

wavwrite error #4

sam81 opened this issue Oct 25, 2013 · 2 comments

Comments

@sam81
Copy link

sam81 commented Oct 25, 2013

I get the following error when I attempt to write a wav file previosly read with wavread

> using WAV
> snd, fs, nbits = wavread("snd.wav")
> wavwrite(snd, "wsnd.wav")
ERROR: no method wavwrite(Array{Float64,2},IOStream,Int64,Int64,Uint16)
 in wavwrite at /home/sam/.julia/WAV/src/WAV.jl:434
 in wavwrite at /home/sam/.julia/WAV/src/WAV.jl:446
@davidavdav
Copy link
Contributor

diff --git a/src/WAV.jl b/src/WAV.jl
index 04f15f9..cce0355 100644
--- a/src/WAV.jl
+++ b/src/WAV.jl
@@ -431,7 +431,7 @@ end
function wavwrite(samples::Array, filename::String; Fs=8000, nbits=16, compress
io = open(filename, "w")
finalizer(io, close)

  • return wavwrite(samples, io, Fs, nbits, compression)
  • return wavwrite(samples, io, Fs=Fs, nbits=nbits, compression=compression)
    end

wavwrite(y::Array, f::Real, filename::String) = wavwrite(y, filename, Fs=f)

@dancasimiro
Copy link
Owner

I believe that this is fixed by 2faff7e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants