-
Notifications
You must be signed in to change notification settings - Fork 391
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
Requested buffer size not used on macOS #748
Comments
I had this issue too. I don't know if it is related to core audio. From what I saw it seemed related to the sample rate. The buffer size would be normal for one sample rate and it would be weird for another. This not only happens on macOS, but also on Linux. I fixed it by using ring buffers. |
Same on macOS Ventura as well. I request 480, I get 1044 (output device) |
@w-ensink Yeah, I ended up writing a quick CoreAudio wrapper myself locally and it runs at the buffer size that I ask it to, so I'm guessing this is an actual bug in CPAL itself. The fact that it also happens on Linux is another give-away. |
Oh wonder how much effort that can take, can you put it in a GitHub gist? |
On Ventura 13.5, changing the default audio output from a device configured for 48khz to a device configured for 44.1khz, or indeed changing the configured sample rate for a device during playback via Audio MIDI Setup, results in the output buffer resizing without any notification from CPAL. |
Hey there! I'm running into the following issue:
supported_output_configs()
and finding one where my preferred buffer size fits within theSupportedBufferSize
range.SupportedStreamConfigRange::with_sample_rate().config()
on this with a rate within the rangeStreamConfig
, I set the buffer size to my preferred one, knowing it's within rangeThe requested buffer size isn't taken into account. When I request
128
I get a stream of279
. Other times I get512
.Am I doing something wrong? Is this a bug? Or is this a limitation of the CoreAudio framework, and if so:
preferred_buffer_size
or something?play()
it? I need that information to build my audio chainThis is on macOS Ventura 13.1, with CPAL
0.15.0
.The text was updated successfully, but these errors were encountered: