We're running into a case where audio is glitching on iOS (super briefly) when we're doing heavier-than-normal processing in our app. A few details:
- We have an always running mixer.
- We're watching BASS_SYNC_STALL on the mixer.
- We're watching with BASS_SYNC_STALL on each channel into the mixer with BASS_Mixer_ChannelSetSync
- We're not seeing any underflows so it seems like an issue with the lower level audio buffers underflowing (I'd guess, at least).
We're trying to play with different options on the device to adjust buffer size, without much luck.
- BASS_CONFIG_DEV_PERIOD: Affects time interval between buffer updates, and thus buffer size (I'm guessing total buffer = period * 2). For example, when I set it to 20, the latency is reported as 43ms and the period is rounded up to 22ms. If I set it to 50, latency is reported as 75ms and period 43ms. If I set it to 100, latency is reported as 139ms and period 86ms. This seems to be the maximum allowed, as if I move it to 200, the latency/period don't change any more.
- BASS_CONFIG_BUFFER: I think this only affects BASS streams, so given that we're not seeing underflow probably not the issue. Same with BASS_CONFIG_MIXER_BUFFER.
So I guess my questions are: (1) Are these all the knobs we have? (2) Does it make sense that the maximum latency is 139ms? (3) Anything else I can do to diagnose/improve?