From f9303fa449e20a105e2f9e30cc731fe20ed9882d Mon Sep 17 00:00:00 2001 From: tofilwiktor Date: Thu, 20 Oct 2022 14:48:37 +0000 Subject: [PATCH] Fixed VMs not launching because of deprecated soundhw --- src/machine.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index 25743fa..1959d2e 100755 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -954,8 +954,14 @@ QStringList Machine::generateMachineCommand() audioCards.append(audioIterator.next()); } - qemuCommand << "-soundhw"; - qemuCommand << audioCards; + qemuCommand << "-audiodev"; + qemuCommand << getHostSoundSystem() + ",id=snd0"; + + if (audioCards.indexOf("hda") != -1) { + qemuCommand << "-device"; + qemuCommand << "ich9-intel-hda"; + } + QString bootOrder; QStringListIterator bootIterator(this->boot->bootOrder()); -- GitLab