[Spice-devel] RFC on sound codec refactoring

Christophe Fergeau cfergeau at redhat.com
Mon Oct 7 11:22:19 CEST 2013


On Fri, Oct 04, 2013 at 01:16:24PM -0500, Jeremy White wrote:
> Yes, he pointed out some issues back in August when this last came up
> (primarily supporting 'old' clients if you're sampling at 48K).  That's
> the bit I'm not entirely clear on just yet, and hope to research a bit
> further.

I'll look at your patches in more details later, but moving code out of
snd_channel.c sounds interesting ;)
Quick answer regarding the resampling, Opus wants to get 48kHz audio data,
so when using Opus, you've got to tell QEMU to give you that. If you are
talking to a client with Opus support, then it's all good, you encode to
Opus and that's it. If you are talking to a client without Opus support,
then you have to fallback to celt, which expects 44.1kHz input (at least,
if I'm not mistaken, and the way we use it in spice). You can't dynamically
tell QEMU that you no longer want 48kHz but that you want 44.1kHz instead,
so you have to downsample yourself the audio from 48 to 44.1 yourself
before sending it.
I'll try to clean up the patches I had so far this week.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131007/e48a1b99/attachment.pgp>


More information about the Spice-devel mailing list