Description
The standalone CPAL backend panics on macOS Apple Silicon when CoreAudio delivers more samples than the configured buffer/period size.
Reproduction
$ ./autokit-standalone --period-size 1024
thread 'cpal_alsa_out' panicked at 'Received 1115 samples, while the configured buffer size is 1024', src/wrapper/standalone/backend/cpal.rs:832
Same behavior at --period-size 512 (receives 558 samples). CoreAudio appears to deliver variable-sized buffers that consistently exceed the requested size.
Workaround: --period-size 4096 avoids the panic but adds ~85ms of latency, which is noticeable for percussive instruments.
Environment
- macOS 15, Apple M1
- nih-plug standalone (CPAL backend)
- VST3 and CLAP builds work fine in DAWs — the host manages buffer sizes correctly there
Expected behavior
The standalone backend should handle CoreAudio's variable buffer sizes without panicking — either by processing incoming audio in chunks of buffer_size, or by dynamically sizing the output storage.
Description
The standalone CPAL backend panics on macOS Apple Silicon when CoreAudio delivers more samples than the configured buffer/period size.
Reproduction
Same behavior at
--period-size 512(receives 558 samples). CoreAudio appears to deliver variable-sized buffers that consistently exceed the requested size.Workaround:
--period-size 4096avoids the panic but adds ~85ms of latency, which is noticeable for percussive instruments.Environment
Expected behavior
The standalone backend should handle CoreAudio's variable buffer sizes without panicking — either by processing incoming audio in chunks of
buffer_size, or by dynamically sizing the output storage.