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

Resample via a libsamplerate #117

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Aug 28, 2024

We need to do this for recording as we can't specify a rate.

We need to do this for playback for sample rates outside of the browser's supported range. That includes the current default rate for Firefox and older Safari.

Uses a resampler build that doesn't support medium/best to save on bundle size.

I've also increased the buffer size so I can play a 44k sample in an OK-ish way. Maybe 256 will be needed.

We know Firefox on Windows still performs poorly. It did badly with audio before these changes.

Another significant issue is that it can take 3 seconds to call getUserMedia on Desktop Safari.

We need to do this for recording as we can't specify a rate.

We need to do this for playback for sample rates outside of the
browser's supported range. That includes the current default rate for
Firefox and older Safari.

Uses a resampler build that doesn't support medium/best to save on
bundle size.

I've also increased the buffer size so I can play a 44k sample in an
OK-ish way. Maybe 256 will be needed.

We know Firefox on Windows still performs poorly. It did badly with
audio before these changes.
Copy link

Preview build will be at
https://review-python-simulator.usermbit.org/resample/

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit ab07528 into beta-updates Aug 28, 2024
3 checks passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the resample branch August 28, 2024 11:39
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.

1 participant