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

Can I change the SampleRate at runtime? #172

Open
hankeyyh opened this issue Jul 27, 2024 · 2 comments
Open

Can I change the SampleRate at runtime? #172

hankeyyh opened this issue Jul 27, 2024 · 2 comments

Comments

@hankeyyh
Copy link

No description provided.

@dusk125
Copy link
Collaborator

dusk125 commented Jul 30, 2024

This project is maintained at https://github.com/gopxl/beep, please direct all future inquiries there.

If you're asking about changing the speaker sample rate after it's been started; no.

For other streamers (decoded from a file or others) it doesn't really make sense to change the sample rate mid stream as they're encoded with a specific sample rate.

If you need to play a piece of audio at a certain different sample rate, then you'll need to resample the audio while playing (or offline for better performance). Beep provides a resampler

1 similar comment
@dusk125
Copy link
Collaborator

dusk125 commented Jul 30, 2024

This project is maintained at https://github.com/gopxl/beep, please direct all future inquiries there.

If you're asking about changing the speaker sample rate after it's been started; no.

For other streamers (decoded from a file or others) it doesn't really make sense to change the sample rate mid stream as they're encoded with a specific sample rate.

If you need to play a piece of audio at a certain different sample rate, then you'll need to resample the audio while playing (or offline for better performance). Beep provides a resampler

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

No branches or pull requests

2 participants