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

Document buffer size expected by AudioQueue/AudioHandler #32

Open
Jokler opened this issue May 3, 2023 · 1 comment
Open

Document buffer size expected by AudioQueue/AudioHandler #32

Jokler opened this issue May 3, 2023 · 1 comment

Comments

@Jokler
Copy link
Contributor

Jokler commented May 3, 2023

I'm using cubeb for audio playback which doesn't seem to let me specify the exact amount of samples per callback. I don't really understand how the amount of samples requested from the AudioQueues would affect the audio which is played back so I assumed that setting the desired samples in the example was not relevant. After hours of testing I tried requesting 1920 samples from the AudioQueues and that fixed my issues.

I think it would be nice if the expected size could be documented so that the next person trying to do something similar doesn't have to struggle (unless this is a bug of course).
I would have expected something like that to be documented here:
https://docs.rs/tsclientlib/latest/tsclientlib/audio/struct.AudioHandler.html#method.fill_buffer
https://docs.rs/tsclientlib/latest/tsclientlib/audio/struct.AudioQueue.html#method.get_next_data

@Flakebi
Copy link
Member

Flakebi commented May 15, 2023

I didn’t get to look into it yet, but this is unexpected. It was meant to work the way you understood it, the sample size should not affect the outcome.

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