Skip to contentSkip to conversation

dsound: warning: Voice is already playing

Qemu-devel Robert Riebisch 3 participants 8 messages Feb 16, 2009 – Feb 18, 2009

lore
Share & tools
lore
#0 lore raw

Hi!

I'm getting "dsound: warning: Voice is already playing", when starting QEMU (VM still at POST screen stage). I built my own Win32 version of QEMU SVN r6626 using MinGW.

I used --audio-card-list="ac97 es1370 sb16 cs4231a adlib gus", --audio-drv-list="dsound sdl fmod", and "-soundhw all".

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#1 lore raw
Quoted 5 lines · Robert Riebisch

Hi!

I'm getting "dsound: warning: Voice is already playing", when starting QEMU (VM still at POST screen stage). I built my own Win32 version of QEMU SVN r6626 using MinGW.

What is the exact sequence of events that leads to it?

Quoted 5 lines

I used --audio-card-list="ac97 es1370 sb16 cs4231a adlib gus", --audio-drv-list="dsound sdl fmod", and "-soundhw all".

Robert Riebisch

Signature · 1 line
mailto:[email protected]
#2 lore raw
Quoted 5 lines · malc
Quoted 3 lines

I'm getting "dsound: warning: Voice is already playing", when starting QEMU (VM still at POST screen stage). I built my own Win32 version of QEMU SVN r6626 using MinGW.

What is the exact sequence of events that leads to it?

What do you mean by "sequence"?

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#3 lore raw
Quoted 9 lines · Robert Riebisch
Quoted 5 lines · malc
Quoted 3 lines

I'm getting "dsound: warning: Voice is already playing", when starting QEMU (VM still at POST screen stage). I built my own Win32 version of QEMU SVN r6626 using MinGW.

What is the exact sequence of events that leads to it?

What do you mean by "sequence"?

Step by step actions after which the following message is seen, including all command line parameters.

Signature · 1 line
mailto:[email protected]
#4 lore raw
Quoted 6 lines · malc
Quoted 3 lines
Quoted 1 line

What is the exact sequence of events that leads to it?

What do you mean by "sequence"?

Step by step actions after which the following message is seen, including all command line parameters.

Build QEMU using:
MSYS-1.0.10.exe
msysDTK-1.0.1.exe +
binutils-2.17.50-20060824-1.tar.gz
gcc-core-3.4.5-20060117-3.tar.gz
gcc-g++-3.4.5-20060117-3.tar.gz
mingw32-make-3.81-20080326-2.tar.gz
mingw-runtime-3.14.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.13-mingw32-dev.tar.gz +
fmodapi375win.zip

./configure --prefix="C:/Programme/qemu-trunk" --target-list="i386-softmmu" --audio-card-list="ac97 es1370 sb16 cs4231a adlib gus" --audio-drv-list="dsound sdl fmod" --fmod-inc="$FMOD_PATH/api/inc" --fmod-lib="$FMOD_PATH/api/lib/libfmod.a" && make && make install

Run QEMU with "C:\Programme\qemu-trunk\qemu.exe -fda empty.img -soundhw all -localtime -no-kqemu" on Windows 2000 Professional SP4.

I narrowed it down to GUS emulation, because this warning also appears, when I just use "-soundhw gus" (not "all").

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#5 lore raw
Quoted 9 lines · Robert Riebisch
Quoted 6 lines · malc
Quoted 3 lines
Quoted 1 line

What is the exact sequence of events that leads to it?

What do you mean by "sequence"?

Step by step actions after which the following message is seen, including all command line parameters.

[..snip..]

Quoted 4 lines

I narrowed it down to GUS emulation, because this warning also appears, when I just use "-soundhw gus" (not "all").

It's actually fallout from r6402:
"Rework vm_state_change notifiers (Jan Kiszka)"

GUS, unlike all other cards emulated by QEMU, is mixing sound at all times and as such it calls AUD_set_active_out during intialization stage which happens before vm_start is called and when it does audio vm change state notification callback is invoked which tries to enable underlying audio subsystem's voice, but it is already enabled and in case of dsound will, rightfully, complain.

Jan, can you please check that this doesn't break Musicpal or the other ARM stuff you have written and i have no means to test:

audio/audio.c +9 -2
index b0a5f3b..a2636cb 100644
@@ -1127,6 +1127,7 @@ void AUD_set_active_out (SWVoiceOut *sw, int on)
 
     hw = sw->hw;
     if (sw->active != on) {
+        AudioState *s = &glob_audio_state;
         SWVoiceOut *temp_sw;
         SWVoiceCap *sc;
 
@@ -1134,7 +1135,9 @@ void AUD_set_active_out (SWVoiceOut *sw, int on)
             hw->pending_disable = 0;
             if (!hw->enabled) {
                 hw->enabled = 1;
-                hw->pcm_ops->ctl_out (hw, VOICE_ENABLE);
+                if (s->vm_running) {
+                    hw->pcm_ops->ctl_out (hw, VOICE_ENABLE);
+                }
             }
         }
         else {
@@ -1170,12 +1173,15 @@ void AUD_set_active_in (SWVoiceIn *sw, int on)
 
     hw = sw->hw;
     if (sw->active != on) {
+        AudioState *s = &glob_audio_state;
         SWVoiceIn *temp_sw;
 
         if (on) {
             if (!hw->enabled) {
                 hw->enabled = 1;
-                hw->pcm_ops->ctl_in (hw, VOICE_ENABLE);
+                if (s->vm_running) {
+                    hw->pcm_ops->ctl_in (hw, VOICE_ENABLE);
+                }
             }
             sw->total_hw_samples_acquired = hw->total_samples_captured;
         }
@@ -1623,6 +1629,7 @@ static void audio_vm_change_state_handler (void *opaque, int running,
     HWVoiceIn *hwi = NULL;
     int op = running ? VOICE_ENABLE : VOICE_DISABLE;
 
+    s->vm_running = running;
     while ((hwo = audio_pcm_hw_find_any_enabled_out (s, hwo))) {
         hwo->pcm_ops->ctl_out (hwo, op);
     }
audio/audio_int.h +1 -0
index c1da710..fc87458 100644
@@ -192,6 +192,7 @@ struct AudioState {
     LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;
     int nb_hw_voices_out;
     int nb_hw_voices_in;
+    int vm_running;
 };
 
 extern struct audio_driver no_audio_driver;
Signature · 1 line
mailto:[email protected]
#6 lore raw
Quoted 25 lines · malc
Quoted 6 lines · Robert Riebisch
Quoted 4 lines · malc
Quoted 2 lines
Quoted 1 line

What is the exact sequence of events that leads to it?

What do you mean by "sequence"?

Step by step actions after which the following message is seen, including all command line parameters.

[..snip..]

Quoted 3 lines

I narrowed it down to GUS emulation, because this warning also appears, when I just use "-soundhw gus" (not "all").

It's actually fallout from r6402:
"Rework vm_state_change notifiers (Jan Kiszka)"

GUS, unlike all other cards emulated by QEMU, is mixing sound at all times and as such it calls AUD_set_active_out during intialization stage which happens before vm_start is called and when it does audio vm change state notification callback is invoked which tries to enable underlying audio subsystem's voice, but it is already enabled and in case of dsound will, rightfully, complain.

Quoted 2 lines

Jan, can you please check that this doesn't break Musicpal or the other ARM stuff you have written and i have no means to test:

Sounds good, at least on the MusicPal (I haven't written the "other stuff" nor do I have test setups at hand).

Jan

#7 lore raw
Quoted 1 line · Jan Kiszka

malc wrote:

[..snip..]

Quoted 5 lines
Quoted 2 lines

Jan, can you please check that this doesn't break Musicpal or the other ARM stuff you have written and i have no means to test:

Sounds good, at least on the MusicPal (I haven't written the "other stuff" nor do I have test setups at hand).

Thanks.

Signature · 1 line
mailto:[email protected]