Comments (14)
It will be a couple of days before I have time to fix this.
from wav.jl.
@backseatviolist I was not able to reproduce this problem today. Do you have a link to a file that causes the problem? Which version of WAV.jl do you have installed?
from wav.jl.
@dancasimiro Strange, it is working on one machine but not another (both are running Ubuntu with Julia 0.4.1 and WAV.jl 0.6.1). Pkg.update(); Pkg.rm("WAV"); Pkg.add("WAV")
didn't fix it. I even removed ~/.julia/
and the problem persists. Something must be screwy with my installation, but I have no idea what.
Attached is a uuencoded WAV file that gives the above error. test.wav.txt
Edit: I just remembered, the machine that's not working is 32-bit and the machine that is working is 64-bit.
from wav.jl.
The problematic line is
samples[i, j] = convert(eltype(samples), signed(my_sample))
in read_pcm_samples
. If I println the two arguments to convert
, running wavread
on the test file gives this output followed by the error:
(Int16,0)
(Int16,0)
(Int16,0)
(Int16,0)
(Int16,1)
(Int16,4294967294)
It fails because 4294967294 is too large for Int16.
from wav.jl.
That looks like integer overflow. Please try changing:
my_sample = unsigned(0)
to:
my_sample = @compat UInt64(0)
in the read_pcm_samples
function. Does it fix the problem on the 32 bit system?
from wav.jl.
Nope, same error.
from wav.jl.
Does Pkg.test("WAV") reproduce the error?
from wav.jl.
Please test commit 561b791. Does it fix the bug? I think that it will, but I don't have a 32 bit CPU to test it on.
from wav.jl.
With the old version, Pkg.test("WAV")
produces a similar error except with write_pcm_samples
:
ERROR: LoadError: InexactError()
in write_pcm_samples at /home/me/.julia/v0.4/WAV/src/WAV.jl:533
in write_pcm_samples at /home/me/.julia/v0.4/WAV/src/WAV.jl:550
in write_data at /home/me/.julia/v0.4/WAV/src/WAV.jl:570
in wavwrite at /home/me/.julia/v0.4/WAV/src/WAV.jl:713
[inlined code] from /home/me/.julia/v0.4/WAV/test/runtests.jl:133
in anonymous at no file:0
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
in process_options at ./client.jl:280
in _start at ./client.jl:378
while loading /home/me/.julia/v0.4/WAV/test/runtests.jl, in expression starting on line 122
in include_from_node1 at ./loading.jl:304
in process_options at ./client.jl:280
in _start at ./client.jl:378
while loading /home/me/.julia/v0.4/WAV/test/runtests.jl, in expression starting on line 122
from wav.jl.
I ran Pkg.rm("WAV"); Pkg.clone("https://github.com/dancasimiro/WAV.jl.git");
. wavread
is working now, but Pkg.test("WAV")
fails with the same error.
from wav.jl.
I pushed a few changes that fix the exceptions on 32 bit systems. However, the 32 bit appveyor tests are still failing the functional tests. Something is broken when the library is trying to encode PCM samples into 64 bits on 32-bit systems. Otherwise, the library appears to work on 32 bit systems. I'm going to keep this issue open until the appveyor tests pass.
FWIW @backseatviolist, you can use "Pkg.checkout" instead of cloning the repository to get an unreleased version.
help?> Pkg.checkout
checkout(pkg, [branch="master"])Checkout the Pkg.dir(pkg) repo to the branch branch. Defaults to checking out the "master" branch. To go back to using the newest compatible released version, use Pkg.free(pkg)
from wav.jl.
Commit 681d0e2 fixes the appveyor tests on 32 bit systems. I think that I will tag this revision for release 0.6.2 to fix this issue. Please let me know if it works as expected on your 32 bit system.
The Fix32Bit branch has all of these related changes, but does not including the preliminary JuliaIO/FileIO.jl changes from master.
from wav.jl.
@dancasimiro The tests now pass on my system and wavread
is working as expected. Thanks a bunch!
from wav.jl.
Fixed in WAV.jl version 0.6.2
from wav.jl.
Related Issues (20)
- Caption for WAV display HOT 3
- Extra \0 bytes in RIFF INFO tags causes wav_info_read() to raise ArgumentError HOT 2
- Buggy interaction with Gtk.jl HOT 2
- wavread needs a "float" data type
- WAV.jl not reading wav files with incorrect file size in header HOT 3
- 256x smaller values using "native" format HOT 5
- wavrecord and simultaneous play and record HOT 7
- Support Julia v0.7? HOT 9
- Artifacts in sound played by wavplay HOT 8
- Playing with @async is blocking HOT 7
- wavplay example not working on Linux HOT 16
- wavread with subrange of step >1 gives wrong result HOT 4
- Add some support for reading from pipe HOT 2
- `wavplay(y, fs)` does not work HOT 11
- Chunk padding not recognized HOT 3
- TagBot trigger issue HOT 3
- Slower loading because of GC issue
- Affiliate this package with JuliaAudio HOT 4
- Read operations do not start at the start of the file
- wavread cannot access a sample number 59614786 or higher HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wav.jl.