diff mbox series

[v5,4/4] coreaudio: Initialize the buffer for device change

Message ID 20250123-coreaudio-v5-4-6873df4215a0@daynix.com (mailing list archive)
State New
Headers show
Series coreaudio fixes | expand

Commit Message

Akihiko Odaki Jan. 23, 2025, 7:18 a.m. UTC
Reallocate buffers when the active device change as the required buffer
size may differ.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 audio/coreaudio.m | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/audio/coreaudio.m b/audio/coreaudio.m
index a8d71c6cf816f7658037e26608a4c1101ebd071e..9edae3d7443a57076781a69dde522cdfcfb77662 100644
--- a/audio/coreaudio.m
+++ b/audio/coreaudio.m
@@ -467,6 +467,7 @@  static OSStatus init_out_device(CoreaudioVoiceOut *core)
     core->device_id = device_id;
     core->device_frame_size = device_frame_size;
     core->hw.samples = core->buffer_count * core->device_frame_size;
+    audio_generic_initialize_buffer_out(&core->hw);
     core->ioprocid = ioprocid;
 
     return 0;