aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_qemu@t-online.de>2020-12-13 14:05:26 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-12-15 09:14:17 +0100
commit53e78d1cfb43df733a278172dd11bc40d2fe69c8 (patch)
treec6c67cea1a0d201abda0d52a2bdf6ea8df20134e /audio
parent1d47067394ef79c2a7ed9d4dd0b18cdf24f88f2f (diff)
downloadqemu-53e78d1cfb43df733a278172dd11bc40d2fe69c8.zip
qemu-53e78d1cfb43df733a278172dd11bc40d2fe69c8.tar.gz
qemu-53e78d1cfb43df733a278172dd11bc40d2fe69c8.tar.bz2
coreaudio: don't start playback in init routine
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 <hsp.cat7@gmail.com> Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de> Message-id: 20201213130528.5863-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/coreaudio.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index 0ee8505..a5df950 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;
}