-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use symphonia for audio handling to support additional file…
… formats (#733) * refactor(symphonia): replace error types * refactor(symphonia): rewrite method bodies and signatures Doesn't compile because source is used twice in new() * refactor(symphonia): inline helper functions for OggDecoder::new Fixes issues with passing the DataSource around, but now it can't be returned as the error * refactor(symphonia): replace format-specific decoder implementations * style: clippy lints * refactor(symphonia): impl Debug for Decoder * style: fix naming no longer a VorbisError, so "ve" doesn't make sense anymore * refactor(symphonia): replace old decoder error variants * refactor(symphonia): replace DataSource in error variants * refactor(symphonia): clean up unwraps and error logging * refactor(symphonia): extract samples method * style: fix clippy lint about unnecessary to_owned call * refactor(symphonia): clean up rewind impl to use the returned symphonia error * fix: fill audio buffer AudioBufferRef::make_equivalent() does not copy the data, so we have to call convert() afterwards. This will also likely need to be changed when upgrading symphonia. See pdeljanov/Symphonia#198. * refactor(sound): change time_seek to return a result, and use it to implement rewind * refactor: replace BufferError with SoundBufferResourceLoadError variants * doc: fix broken method link * feat: add missing symphonia codecs for mp3, etc. * fix(sound): interleave audio with multiple channels * feat: use file extension as hint for symphonia probe * style: rename variables for clarity * fix: fix MediaSource impl for DataSource * style: condense imports * fix: fix MediaSource impl for DataSource::Memory * refactor: add byte_len function to FileReader trait
- Loading branch information
Showing
10 changed files
with
270 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.