Git Product home page Git Product logo

Comments (14)

dancasimiro avatar dancasimiro commented on August 11, 2024

It will be a couple of days before I have time to fix this.

from wav.jl.

dancasimiro avatar dancasimiro commented on August 11, 2024

@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.

nhthn avatar nhthn commented on August 11, 2024

@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.

nhthn avatar nhthn commented on August 11, 2024

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.

dancasimiro avatar dancasimiro commented on August 11, 2024

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.

nhthn avatar nhthn commented on August 11, 2024

Nope, same error.

from wav.jl.

dancasimiro avatar dancasimiro commented on August 11, 2024

Does Pkg.test("WAV") reproduce the error?

from wav.jl.

dancasimiro avatar dancasimiro commented on August 11, 2024

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.

nhthn avatar nhthn commented on August 11, 2024

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.

nhthn avatar nhthn commented on August 11, 2024

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.

dancasimiro avatar dancasimiro commented on August 11, 2024

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.

dancasimiro avatar dancasimiro commented on August 11, 2024

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.

nhthn avatar nhthn commented on August 11, 2024

@dancasimiro The tests now pass on my system and wavread is working as expected. Thanks a bunch!

from wav.jl.

dancasimiro avatar dancasimiro commented on August 11, 2024

Fixed in WAV.jl version 0.6.2

from wav.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.