[pulseaudio-discuss] Patch for VolumeRamping

Zheng, Huan huan.zheng at intel.com
Mon Jun 8 00:03:35 PDT 2009


Hi, Lennart
The attachment is the patch for volume ramping. Please review.

Impact to PA:
This patch will enable PA with volume ramping feature. People use IPhone may have this kind of experience that when a telephone call comes in when user is listening to music, the music is gradually volume down to mute; and after the call, the music is gradually volume up to previous level. This patch will give PA the ability to do the similar thing, and I have tested with this patch, the effect is as good as IPhone.
Two API is exported for this feature:
void pa_sink_input_set_volume_with_ramping(pa_sink_input *i, const pa_cvolume *volume, pa_bool_t save, pa_bool_t absolute, pa_usec_t t);
void pa_sink_input_set_mute_with_ramping(pa_sink_input *i, pa_bool_t mute, pa_bool_t save, pa_usec_t t);

What's included in this patch:
1, Fixed various bugs in envelope.c
2, Added logic in sink-input.c for volume ramping

Calculation formula is in the comments for the code, so I don't explain in this mail, please check the code. Thanks!


Best Regards, Zheng, Huan(ZBT)

OTC/SSD/SSG

Intel Asia-Pacific Research & Developement Ltd

Tel: 021-6116 6435

Inet: 8821 6435

Cub: 3W035

-----Original Message-----
From: pulseaudio-discuss-bounces at mail.0pointer.de [mailto:pulseaudio-discuss-bounces at mail.0pointer.de] On Behalf Of Lennart Poettering
Sent: 2009年4月17日 22:43
To: pulseaudio-discuss at mail.0pointer.de
Subject: Re: [pulseaudio-discuss] About volume ramping

On Fri, 17.04.09 11:12, Zheng, Huan (huan.zheng at intel.com) wrote:

> Hi,
> I have a quick question on volume ramping.
> When will the code of volume ramping be enabled inside PA?

I began work on the enveloping stuff a while back but never actually
made use of it anywhere in PA. Can't work on everything at the same
time, sorry.

It's going to be enabled when it is going to be enabled. Sorry, but
there's nothing more definite I could say.

Always happy to take patches! If you want something to happen the best
way is always to do it yourself!

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss at mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-Volume-Ramping-feature-into-PulseAudio.patch
Type: application/octet-stream
Size: 32997 bytes
Desc: 0001-Add-Volume-Ramping-feature-into-PulseAudio.patch
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20090608/68df78e2/attachment.obj>


More information about the pulseaudio-discuss mailing list