Skip to content

Unable to load/decode 8 bit unsigned WAV file #15

Closed

Description

@crcdng

macOS 10.14.1, Processing 3.4, Sound 2.0.2

Nov 12, 2018 12:30:43 AM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.8.0 (build 463, 2017-10-16)
Sound library error: unable to decode sound file

This is a small .wav file that plays without problems in Preview. (attached)

Edit: Minim opens and plays the file.

ping.wav.zip

Activity

  1. kevinstadler commented on Nov 14, 2018

    @kevinstadler
    Collaborator

    Thanks for providing the sound file, it's very helpful! I think JSyn fails to decode the file because it is in unsigned (8 bit) PCM encoding. To fix this we will probably have to switch to a different library/code for loading WAV samples.

  2. changed the title [-]Sound library error: unable to decode sound file[/-] [+]Unable to load/decode 8 bit unsigned WAV file[/+] on Nov 14, 2018
  3. crcdng commented on Nov 14, 2018

    @crcdng
    Author

    Good to hear. The file is created with http://github.grumdrig.com/jsfxr/, one of the bfxr/sfxr family of tools to generate sound effects for games.

  4. kevinstadler commented on May 15, 2019

    @kevinstadler
    Collaborator

    Just to confirm, the lack of support for compressed WAV formats is documented here: http://www.softsynth.com/jsyn/docs/javadocs/com/jsyn/util/SampleLoader.html

    Despite what it says there, setting the Javasound preferred flag does not add support for 8bit unsigned WAV files. I wonder if we could somehow still easily add support by fiddling with JavaSounds's AudioInputStream class directly.

  5. added 2 commits that reference this issue on Sep 13, 2023
    58f0eb1
    0d8287d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions