[Spice-devel] spice-html5 and raw PCM playback

lgcortinas lgcortinas at gradiant.org
Tue May 12 03:00:57 PDT 2015


Hello,

I'm running Debian 7.7 guest on Ubuntu 14.04 with QEMU 2.0.0 downloaded 
from the Ubuntu repositories.
With spicec client everything runs fine, but when using the spice-html5 
client the sound doesn't work. I have
noticed that the server is sending the audio in raw PCM format and the 
html client complains about it. So I
tried to set the "playback-compression" option to "on" (should be "on" 
by default), but it didn't work.

Now I'm trying to tweak the javascript code for being able to play PCM 
audio, so I started to write some trial
code, however, I'm stuck with the addSourceBuffer method, it doesn't 
seem to recognize other MIME type
different than the original 'audio/webm; codecs="opus"' (I tried with 
Chrome and Firefox).

    from playback.js:

        (...)
        function handle_source_open(e)
        {
             var p = this.spiceconn;

             if (p.source_buffer)
                 return;

             p.source_buffer =
        this.addSourceBuffer(SPICE_PLAYBACK_CODEC);  // I can't use
        other different than
                                                          //
        'audio/webm; codecs="opus"'
             if (! p.source_buffer)
        (...)

Maybe I missing something or it's impossible to make PCM audio work on 
MediaSource API.

Modify the server would be hard at this moment, but if there's no other 
option, which version(s) should I use
to force the server to use opus?

I really appreciate any help you can provide.

Lorenzo.

-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150512/5a07d5f9/attachment-0001.html>


More information about the Spice-devel mailing list