Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethrow panics in nodes during user tests #523

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

orottier
Copy link
Owner

@orottier orottier commented Sep 5, 2024

Fixes #522

@orottier
Copy link
Owner Author

orottier commented Sep 9, 2024

@b-ma maybe you are more familiar with the inner workings of the WaveShaperNode?
The issue in the tests is

---- node::waveshaper::tests::test_user_defined_options stdout ----
thread 'node::waveshaper::tests::test_user_defined_options' panicked at src/node/waveshaper.rs:328:46:
assertion `left == right` failed
  left: 128 --->  the channel length
 right: 256 ---->  processor.input_frames_next()

in self.upsampler_x2.process(channels):

   6: web_audio_api::node::waveshaper::Resampler::process
             at ./src/node/waveshaper.rs:328:9
   7: <web_audio_api::node::waveshaper::WaveShaperRenderer as web_audio_api::render::processor::AudioProcessor>::process
             at ./src/node/waveshaper.rs:429:21

I don't see why the upsampler x2 should have 256 as input size...

impl ResamplerConfig {
    fn upsample_x2(channels: usize, sample_rate: usize) -> Self {
        let chunk_size_in = RENDER_QUANTUM_SIZE * 2;

Could you shed some light?

@b-ma
Copy link
Collaborator

b-ma commented Sep 9, 2024

Hum I don't know actually, looks like either it has always been there and the underlying lib has been fixed somehow, or I introduced that by mistake in some refactoring... I can have a look

@orottier
Copy link
Owner Author

Okay thanks. Let me know how it goes, if it takes more time I can release a fix for the buffer loop separately

@b-ma
Copy link
Collaborator

b-ma commented Sep 10, 2024

cf #526

@orottier orottier marked this pull request as ready for review September 10, 2024 11:07
@orottier orottier merged commit 8502dec into main Sep 10, 2024
3 checks passed
@orottier orottier deleted the feature/rethrow-unit-test-processor-panics branch September 10, 2024 11:14
@orottier
Copy link
Owner Author

Thanks. I will release tonight. V-1.0.0 probably, why not? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible issue with catch_unwind in renderer for unit tests
2 participants