]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: run downstream playback queue unconditionally
authorVolker Rümelin <vr_qemu@t-online.de>
Fri, 23 Sep 2022 18:36:31 +0000 (20:36 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Oct 2022 08:17:08 +0000 (10:17 +0200)
Run the downstream playback queue even if the emulated audio
device didn't write new samples. There still may be buffered
audio samples downstream.

This is for the -audiodev out.mixing-engine=off case. Commit
a8a98cfd42 ("audio: run downstream playback queue uncondition-
ally") fixed the out.mixing-engine=on case.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/audio.c

index 29da359b416b1ef913e906a8461ebe5808cfa931..567f953e66f92043018f356d15ebeb04b35c9f80 100644 (file)
@@ -1143,6 +1143,10 @@ static void audio_run_out (AudioState *s)
                                 hw_free * sw->info.bytes_per_frame);
             }
 
+            if (hw->pcm_ops->run_buffer_out) {
+                hw->pcm_ops->run_buffer_out(hw);
+            }
+
             continue;
         }
 
@@ -1501,10 +1505,6 @@ size_t audio_generic_write(HWVoiceOut *hw, void *buf, size_t size)
         }
     }
 
-    if (hw->pcm_ops->run_buffer_out) {
-        hw->pcm_ops->run_buffer_out(hw);
-    }
-
     return total;
 }