[Stk] RtAudio with PulseAudio

Peter Meerwald pmeerw at pmeerw.net
Thu Dec 1 07:06:38 PST 2011


Hello Tristan, Gary,

I have reworked the PulseAudio patch (based on Vincent Benony's patch), it 
now supports
- input, output and duplex
- a range of sample rates
- a range of sample formats

the general idea is to request the stream as needed from PulseAudio so 
that no conversion is needed in RtAudio; the supported stream parameters 
are therefore somewhat limited (and I only tested on little-endian 
machines)

there is no probing (yet), but I think it is useful to just connect to the 
default device PulseAudio provides; error handling is lacking currently, 
as is documentation

the main PulseAudio specific code is in RtAudio-pulse.cpp (which gets 
included in RtAudio.cpp) -- this can be changed of course, or 
the massive RtAudio.cpp file is split following a similar idea...

the patch works for me; I would like to get some feedback and hope it can 
be included in RtAudio

thanks, regards, p.

---------- Forwarded message ----------
Date: Wed, 16 Nov 2011 10:47:46 +0100 (CET)
From: Peter Meerwald <pmeerw at pmeerw.net>
To: Tristan Matthews <le.businessman at gmail.com>
Cc: Gary Scavone <gary.scavone at mcgill.ca>, Stk <stk at ccrma.stanford.edu>
Subject: Re: RtAudio with PulseAudio

Hello,

> > I'm attaching a diff file that was submitted by Vincent Benony at Arobas Music that implemented some level of support for PulseAudio.  I've never tried it myself.  I'm also cc'ing Tristan Matthews, as he had indicated an interest in adding PulseAudio support some time ago.
> I'd be happy to work from that patch, I'll let you know when I've had
> a chance to test it a bit.

to spell out the level of support: currently the PulseAudio patch is 
limited to output-only, one particular sample format (44.1 KHz, 
SINT16, 2 channels) and there is no probing of any sort

the 'simple' PulseAudio client interface is used

I'd need duplex support and I am afraid that the more 
complicated 'asynchronous' PulseAudio API needs to be used...

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtaudio-pulse.patch
Type: text/x-diff
Size: 17025 bytes
Desc: 
Url : http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20111201/8d719ad3/attachment.bin 


More information about the Stk mailing list