Re: spice-html5 and raw PCM playback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I have tried to add the audio device when the client is connected, but I
> can't do it while the virtual machine is running, and I can't keep the
> client connected whith the machine turned off or during a reboot.
> 
> I'm using virt-manager to do this and I don't know if there's another
> way to do it, if not, is there a way to tell spice to always use opus?

I can't think of a way to do it from the command line or by adjusting
anything.  I would test my theory to see if it's right, first.
Unfortunately, I can only think of a source code change to test that.

The attached patch to qemu should do that; it forces the frequency to
48000.  That won't inherently force Opus, but if Celt is used, things
will sound squeaky :-).

Cheers,

Jeremy
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 7b79bed..2a057c2 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -120,11 +120,8 @@ static int line_out_init (HWVoiceOut *hw, struct audsettings *as)
     SpiceVoiceOut *out = container_of (hw, SpiceVoiceOut, hw);
     struct audsettings settings;
 
-#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
     settings.freq       = spice_server_get_best_playback_rate(NULL);
-#else
-    settings.freq       = SPICE_INTERFACE_PLAYBACK_FREQ;
-#endif
+    settings.freq       = 48000; /* HACK */
     settings.nchannels  = SPICE_INTERFACE_PLAYBACK_CHAN;
     settings.fmt        = AUD_FMT_S16;
     settings.endianness = AUDIO_HOST_ENDIANNESS;
@@ -135,9 +132,7 @@ static int line_out_init (HWVoiceOut *hw, struct audsettings *as)
 
     out->sin.base.sif = &playback_sif.base;
     qemu_spice_add_interface (&out->sin.base);
-#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
     spice_server_set_playback_rate(&out->sin, settings.freq);
-#endif
     return 0;
 }
 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]