@samitouri / QOSamiQemu / commits / 461632f0b1

coreaudio: Initialize the buffer for device change

Reallocate buffers when the active device change as the required buffer size may differ. Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu> Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260304-coreaudio-v8-6-bf1d40731e73@rsg.ci.i.u-tokyo.ac.jp>

Akihiko Odaki committed Mar 4, 2026 at 15:16 UTC 461632f0b1cb2c5c29ba9875857637e3356b903c
1 file changed +1
audio/coreaudio.m
+1
@@ -471,6 +471,7 @@ static OSStatus init_out_device(CoreaudioVoiceOut *core)
471 core->device_id = device_id;
472 core->device_frame_size = device_frame_size;
473 core->hw.samples = core->buffer_count * core->device_frame_size;
474 + audio_generic_initialize_buffer_out(&core->hw);
475 core->ioprocid = ioprocid;
476
477 return 0;