[pulseaudio-discuss] pulseaudio-discuss Digest, Vol 65, Issue 10

Mike Mestnik mmestnik at nagios.com
Thu Aug 19 11:13:15 PDT 2010


> Message: 2
> Date: Sat, 14 Aug 2010 07:30:16 +0300
> From: Tanu Kaskinen <tanuk at iki.fi>
> Subject: Re: [pulseaudio-discuss] These ideas I've had for the better
> 	part of a month, forgive me for there length.
> To: pulseaudio-discuss at mail.0pointer.de
> Message-ID: <1281760216.5451.12.camel at jarl>
> Content-Type: text/plain; charset="UTF-8"
>
> On Sat, 2010-08-07 at 12:47 -0500, Mike Mestnik wrote:
>   
>> There is a cause to add several stream types to pulse audio for the
>> support of all the hardware's features.  Current stream types can be
>> described by ~3 dimensions (channels, bits, bit-format, rate).
>>
>> The first that would be necessary is raw.  That is pre-mixed information
>> that can't be further mixed.  Each stream is to be given a priority
>> ~0-15 where default for existing streams is 7 and raw streams default to 11.
>>
>> This makes pre-mixed sounds cause all other sounds to be silenced so
>> they can be played.  The effect is the ability to play videos(ac3/dts)
>> while other applications are emitting data, no need to close
>> browser/flash.  The first optional extension is the ability to indicate
>> to sources that they will not be played in the form of a warning
>> returned to data passed and a signal indicating that play can continue.
>>     
>
> I don't know if you've followed the recent AC3 discussion, but some
> support for "raw" (aka passthrough) streams has been implemented now.
> Currently the logic doesn't give precedence for passthrough streams. It
> might make sense to do so, though.
>
>   
>> A notable improvement over the current ALSA-passthrough is the addition
>> of framing.  Currently pausing and restarting a pre-mixed stream causes
>> loud pops and clicks, this is undesirable and as such pulse audio can
>> offer a solution.
>>     
>
> The current code doesn't understand such frames, but I think this idea
> is also a good one to keep in mind.
>
>   
>> The next stream type should be a pulse audio internal type(s) used for
>> the mixing of mp3/ac3 and perhaps dts streams.  It's my understanding
>> that ac3 uses vectors to describe 6 channels of sound much like a 2ch
>> mp3.  If I'm not mistaken these vectors can be combined mathematically
>> as-is to represent the combination of two sounds.  This would be a great
>> achivement over any uncompress/combine/recompress senerio.
>>     
>
> Do you have any pointers to how this is done? If it's true that there
> really is a way to mix compressed streams without uncompressing first,
> then maybe volume adjustment is possible too?
>
>   
I'm unsure of how this would work, but it'd be a lot of vector math.  
Volume adjustment should be possible by setting DRC options and perhaps 
other general volume tags.  Adjusting the volume is difficult because it 
would involve cos and tan plus vector math, if I understand the format 
correctly.

What I was suggesting is a short-cut method to doing the full 
uncompress/recompress.  The result should be a playable stream that is 
encoded using compression, but is likely not vary well compressed...  
The resulting stream may well be bigger then it's uncompressed counterpart.

The idea being that space is less-precious then CPU time.




More information about the pulseaudio-discuss mailing list