opus: implement range decoder. (v2)#313
Open
a1phyr wants to merge 2 commits intopdeljanov:dev-0.6from
Open
Conversation
Contributor
Author
|
I added another commit to fix the CI on MacOS |
Owner
|
Could you submit the CI change as a separate PR against |
hasezoey
reviewed
Dec 9, 2024
Contributor
hasezoey
left a comment
There was a problem hiding this comment.
I am not familiar what state the opus decoder is currently in, so i just tried running it on a opus file via symphonia-play, but got a divide by zero error:
thread 'main' panicked at symphonia-core/src/audio/buf.rs:84:25:
attempt to divide by zero
stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
2: core::panicking::panic_const::panic_const_div_by_zero
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:181:21
3: symphonia_core::audio::buf::AudioBuffer<S>::new
at /mnt/ssd/projects/rust/Symphonia/symphonia-core/src/audio/buf.rs:84:25
4: symphonia_codec_opus::OpusDecoder::try_new
at /mnt/ssd/projects/rust/Symphonia/symphonia-codec-opus/src/lib.rs:64:21
5: <symphonia_codec_opus::OpusDecoder as symphonia_core::codecs::registry::RegisterableAudioDecoder>::try_registry_new
at /mnt/ssd/projects/rust/Symphonia/symphonia-codec-opus/src/lib.rs:119:21
6: symphonia_core::codecs::registry::CodecRegistry::register_audio_decoder_at_tier::{{closure}}
at /mnt/ssd/projects/rust/Symphonia/symphonia-core/src/codecs/registry.rs:246:41
7: core::ops::function::FnOnce::call_once
at /home/hasezoey/.local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
8: symphonia_core::codecs::registry::CodecRegistry::make_audio_decoder
at /mnt/ssd/projects/rust/Symphonia/symphonia-core/src/codecs/registry.rs:314:16
9: symphonia_play::play_track
at ./src/main.rs:422:9
10: symphonia_play::play
at ./src/main.rs:381:15
11: symphonia_play::run
at ./src/main.rs:234:17
12: symphonia_play::main
at ./src/main.rs:124:22
13: core::ops::function::FnOnce::call_once
at /home/hasezoey/.local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5| ape = ["symphonia-metadata/ape"] | ||
| id3v1 = ["symphonia-metadata/id3v1"] | ||
| id3v2 = ["symphonia-metadata/id3v2"] | ||
| opus = ["dep:symphonia-codec-opus"] |
Contributor
There was a problem hiding this comment.
i dont know the full state of this PR, but shouldnt this also be in all-codecs?
Contributor
Author
There was a problem hiding this comment.
I don't think so, the code doesn't do much as this point.
57482c3 to
59b29bf
Compare
Contributor
|
Retried with the updated code, the "divide by zero" is gone, now its: thread 'main' panicked at symphonia-play/src/output.rs:61:13:
assertion failed: pa_spec.is_valid()
stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
2: core::panicking::panic
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:148:5
3: symphonia_play::output::pulseaudio::PulseAudioOutput::try_open
at ./symphonia-play/src/output.rs:61:13
4: symphonia_play::output::try_open
at ./symphonia-play/src/output.rs:440:5
5: symphonia_play::play_track
at ./symphonia-play/src/main.rs:460:42
6: symphonia_play::play
at ./symphonia-play/src/main.rs:381:15
7: symphonia_play::run
at ./symphonia-play/src/main.rs:234:17
8: symphonia_play::main
at ./symphonia-play/src/main.rs:124:22
9: core::ops::function::FnOnce::call_once
at /home/hasezoey/.local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5and when adding debug log for DEBUG: AudioSpec {
rate: 0,
channels: None,
}Which i guess is now the more correct output as there is no decoding done (and so the audio buffer is not configured), right? |
Port from existing opus branch.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase of #116 onto dev branch.
I have just rebased the commits and adapted the code to new APIs, but did not add anything significant to the work of @thinking-tower.
cc #8
Close #116