[vbox-dev] PulseAudio support rewrite [Patch]

Arthur Taylor art at ified.ca
Tue Jan 5 00:52:29 PST 2010


Thanks for the feedback! The code style change was a force of habit
thing, no problems. Any thoughts on the variable names?

The PA_STREAM_ADJUST_LATENCY stream flag can be selectively enabled
for recent versions by using the PA_API_VERSION define.
PA_STREAM_ADJUST_LATENCY isn't strictly required, without the
functionality there will be an extra latency, but things should still
work fine. If a binary is compiled against a newer version of the
includes it should still work with a pre pulse-0.9.11 userspace as the
server will just ignore the flag. The functions used are not dependent
on that version. I had fun with this in another project because ubuntu
shipped pulse version 0.9.10 for seemingly forever while patches I
wrote used functions from 0.9.11 and newer.


On Tue, Jan 5, 2010 at 12:12 AM, Frank Mehnert <Frank.Mehnert at sun.com> wrote:
> Art,
> On Sunday 03 January 2010, Arthur Taylor wrote:
>> >> A month ago I was approached by a VirtualBox user asking if I would
>> >> take a look at the VirtualBox PulseAudio support code because of work
>> >> I had done with PulseAudio and Wine. The attached patch is the result
>> >> of my investigation. The code is simpler in some places and commented
>> >> more. This patch's main purpose is that it fixes
>> >> http://www.virtualbox.org/ticket/4302 as pulse_run_in was completely
>> >> rewritten. The way streams are connected and buffers metrics chosen
>> >> was also simplified. Audio output should work as well as before or
>> >> better. From what I can tell audio capture support had stopped working
>> >> because of a PulseAudio daemon behavior change where it will now pass
>> >> very very small fragments rather than only large ones.
>> >>
>> >> If the patch is needs improvement, I'm always wanting feedback. The
>> >> contents of the patch are derived from VirtualBox source code.
>> >> Contributions which are original are wholly my own work and are
>> >> licensed under the MIT licence.
> thanks for this patch! I'm currently reviewing it. While doing this
> I will revert some of your coding style changes. Our coding style
> is documented in doc/VBox-CodingGuidelines.cpp. Code which was imported
> from other projects (e.g. some devices and drivers as well as parts of
> the audio subsystem) will usually keep the style of the original project
> while code written from scratch (like the pulseaudio driver) should
> comply with the coding style of VBox. I hope you can comprehend our
> intensions.
> There is currently an issue (I'm still not 100% through your changes):
> The flag PA_STREAM_ADJUST_LATENCY is only available starting with
> PulseAudio 0.9.11 (PA_API_VERSION >= 12). As we support the PulseAudio
> backend on older Linux distributions as well we need adaptions for
> the older API.
> Kind regards,
> Frank
> --
> Dr.-Ing. Frank Mehnert
> Sitz der Gesellschaft:
> Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
> Amtsgericht München: HRB 161028
> Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
> Vorsitzender des Aufsichtsrates: Martin Häring
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev

Arthur Taylor
art at ified.ca
theycallhimart at gmail.com

More information about the vbox-dev mailing list