[Stk] RtAudio with PulseAudio

Tristan Matthews le.businessman at gmail.com
Mon Dec 5 19:27:14 PST 2011


Hi Peter,

2011/12/1 Peter Meerwald <pmeerw at pmeerw.net>:
> 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

Great! I was able to build it without any issues, however some of the
test programs fail silently (playsaw for example). Otherwise, it would
be desirable to rewrite this with the asynchronous API. I'm a little
overloaded right now, but hopefully will have time to contribute over
the holidays. I created a git repo with a branch specific to pulse
development here:
https://github.com/tmatth/RtAudio/tree/pulseaudio

> 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...

Gary, how do you feel about splitting up RtAudio.cpp? I think it would
ease maintenance/development, but I understand that it's a significant
change.

Best,
Tristan

>
> 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)



-- 
Tristan Matthews
web: http://tristanswork.blogspot.com



More information about the Stk mailing list