[pulseaudio-discuss] Support for audio envelopes
Flavio Ceolin
flavio.ceolin at profusion.mobi
Mon Jul 30 08:18:23 PDT 2012
Hi folks,
> Tanu Kaskinen <tanuk at iki.fi> writes:
>
> Hi Tanu,
>
>> On Fri, 2012-07-20 at 17:32 -0300, Flavio Ceolin wrote:
>>> Tanu Kaskinen <tanuk at iki.fi> writes:
>>> > There were problems with the code. I don't remember what exactly was
>>> > broken, though. But at least I didn't like the concurrency handling: I
>>> > really dislike doing inter-thread communication by using shared
>>> > variables. Instead, message passing should be used, in my opinion.
>>>
>>> I'll investigate how to solve it. Btw, do you think it's better start
>>> from the scratch or it's ok start from this code ?
>>
>> I really don't know. I'm not familiar enough with the code to know how
>> much of it needs rewriting.
>>
>> I know that Jaska Uimonen has been working with volume envelopes too,
>> and asked him yesterday about the status. He said he will post the code
>> to the mailing list on Monday. I haven't seen the code, but if it's
>> good, then it might be a good starting point too (Jaska said that it's
>> lacking multichannel support, so work will be needed).
>>
>
> It's really good to heard it.
>
>>> >> 2) How an application should use this code, AFAIK this code is not being
>>> >> exported.
>>> >
>>> > What's your use case? If we are talking about sink volume ramping, I
>>> > don't see the need for a client interface at all, because it should be
>>> > done automatically by the server.
>>>
>>> Basically I want to set an envelope which apply a filter changing the
>>> sound balance and/or the volume, it's easier demonstrating an idea of an
>>> envelope:
>>
>> But what's the use case (user-visible feature) that you're interested
>> in? My answer to the "how an application should use this code" depends
>> on the use case.
>
> I want make possible an application associate an action with an audio
> effect. For example, a dialog pops up and you want to keep that sample
> pattern playing but you want to "fade it out" so its really quiet. So over
> 2 seconds you fade it out. Another example would be you shift balance to
> the left or right according with the mobile phone (or whatever you want)
> position.
>
> Regards,
> Flavio Ceolin
Trying to continue this matter, the idea of make this funcionality so
generic is facilitating for other applications. I believe several
applications (like media players) that use PA are implementing it's own
"basic" effects as crossfading or fade-in/out for pause. I think make it
easier is a goal.
Other benefit of supporting it, is make possible the ducking[1] effect on
audio streams, as we've discussed on irc, a good example for this is the
sms case (when a sms comes the others samples should fade-out).
Another point to have it is the sample cache. If the sample is already
in the cache and the application should do fade-in/out or change the
balance, the only way to do that is re-uploading the sample.
So guys, what you think about, it worth to implement ? If not, what you
think should be changed ? I'm open to discuss it.
[1] http://en.wikipedia.org/wiki/Ducking
Regards,
Flavio Ceolin
More information about the pulseaudio-discuss
mailing list