[Spice-devel] [PATCH] Implement sending audio to the client from a directory of FIFO queues
Andrew Eikum
aeikum at codeweavers.com
Tue Feb 12 07:25:42 PST 2013
This introduces a new Xorg.conf option, SpicePlaybackFIFODir, which will
be monitored for files. The XSpice driver will mix and forward the audio
data sent to those pipes to the Spice client.
This is designed to work with PulseAudio's module-pipe-sink, but should
work with any audio output to a pipe. For example, use with this PA
configuration option:
load-module module-pipe-sink file=$FIFO_DIR/playback.fifo format=s16 rate=44100 channels=2
making sure the format, rate, and channels match the Spice protocol
settings.
---
A couple of small concerns worth talking about:
1) The code starts up a new thread to do the mixing. Could we run into
concurrency issues with mode switching, or during teardown? Doesn't
seem to have been a problem in practice.
2) There doesn't seem to be much teardown code in the QXL driver, so
the audio thread effectively never quits until the driver exits.
3) I disabled the CELT compression because it corrupted the audio. I
guess CELT support may not be long for this world, so I didn't look
further into it. That means data is sent over the pipe raw.
src/Makefile.am | 2 +
src/qxl.h | 6 +
src/qxl_driver.c | 18 ++-
src/spiceqxl_audio.c | 318 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/spiceqxl_audio.h | 31 +++++
5 files changed, 374 insertions(+), 1 deletion(-)
create mode 100644 src/spiceqxl_audio.c
create mode 100644 src/spiceqxl_audio.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-sending-audio-to-the-client-from-a-directo.patch
Type: text/x-patch
Size: 14867 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130212/7f778119/attachment.bin>
More information about the Spice-devel
mailing list