This adds two dependencies, they are only needed for the test suite.
Compile time will not increase for users. The extra overhead when
running the test suite is worth it imho. The test file is significantly
shorter and there is less code duplication. A run time solution would
decrease the test interface (you would have to manually find out which
params caused the test).
seek is broken, https://github.com/RustAudio/lewton/issues/73.
We could work around it by:
- using unsafe to create an instance of Self
- use mem::swap to turn the &mut self into a mut self
- take out the underlying Read+Seek
- make a new self and seek
If this issue is fixed use the implementation in
commit: 3bafe32388
* add symphonia decoder
* add symphonia-flac
* better compile errors
* remove unsafe send
* update ci
* sudo
* disable duration check because symphonia does not support it
* add error handling
* cleanup
* update symphonia and fix breaking changes
* update to published symphonia version
* update docs
* reduce namespace duplication
* remove extra reference to current frame
* pr comments
* exclude decoders from module if unused
* fix flac test
* recommend disabling default features with symphonia
* Read 32 bit float and 24 bit int encoded files correctly.
Before, we were assuming that all WAV files are encoded as 16 bit integers.
This is not true, WAVs can actually also be encoded as 32 bit floats and
24 bit integers. Hound returns `Err` when we attempt to read files as the
wrong encoding, which was getting `unwrap_or`'d to just zero. This explains
why the file would load but not play any sound. We fix this by first
checking for the appropriate encoding, and then converting to an i16. This
might cause some slight dither issues but hopefully it is quiet enough that
it doesn't matter.
Fixes#195.
* Add tests of reading wav files different encodings
* Use `.map()` instead of control flow & unwrapping.
This makes things slightly cleaner to read.
Also remove extraneous print statement.