From 53e78d1cfb43df733a278172dd11bc40d2fe69c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Volker=20R=C3=BCmelin?= Date: Sun, 13 Dec 2020 14:05:26 +0100 Subject: [PATCH] coreaudio: don't start playback in init routine MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device to keep the Core Audio device run state in sync with hw->enabled. Tested-by: Howard Spoelstra Signed-off-by: Volker RĂ¼melin Message-id: 20201213130528.5863-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann --- audio/coreaudio.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 0ee85052c4..a5df950514 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -584,17 +584,6 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as, return -1; } - /* start Playback */ - if (!isPlaying(core->outputDeviceID)) { - status = AudioDeviceStart(core->outputDeviceID, core->ioprocid); - if (status != kAudioHardwareNoError) { - coreaudio_logerr2 (status, typ, "Could not start playback\n"); - AudioDeviceDestroyIOProcID(core->outputDeviceID, core->ioprocid); - core->outputDeviceID = kAudioDeviceUnknown; - return -1; - } - } - return 0; } -- 2.11.4.GIT