[PATCH v7 6/6] coreaudio: Initialize the buffer for device change

Akihiko Odaki posted 6 patches 1 week, 5 days ago
[PATCH v7 6/6] coreaudio: Initialize the buffer for device change
Posted by Akihiko Odaki 1 week, 5 days ago
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 --git a/audio/coreaudio.m b/audio/coreaudio.m
index 43a5f837ba4cfe4464eaab8f1693696638e14113..6ca5c038c9fc176238a9d845e8705177c0d2341c 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;

-- 
2.48.1