[pulseaudio-discuss] Updated volume ramping feature - patch 1

Zheng, Huan huan.zheng at intel.com
Wed Jul 15 19:48:21 PDT 2009


Previous mail is blocked due to large size, I separate the patch into 3, this is the first one.

Hi, Lennart
Sorry for being late, was fully occupied by other tasks.

I modified the volume ramping feature per your suggestions.
1, rewind envelop when rewinding sink-input. And keep the envelop around until i->sink->max_rewind is processed after the envelop is finished.
2, make all envelop manipulation inside the IO context, main thread just set the pa_envelope_def and then send out SET_ENVELOPE message to let IO thread create the envelop. And this will make it possible to create envelope in other places, not just inside set_volume_with_ramping set_mute_with_ramping.
3, future_volume, future_mute is introduced to avoid distortion before envelop takes effect, e.g. when unmute, if you change the thread_info.muted immediately, you will hear a short loud sound before ramping up takes effect, future_mute could avoid this issue.
4, do not apply sink's volume when setting ramp info. Since it does not help a lot to avoid calculation overflow.

I do not use pa_envelope_replace, it seems envelope_replace is intend to replace the pa_envelope_def inside pa_envelope_item, our code only has one pa_envelope_def, if I call replace, it's like replace myself with myself, I'm not sure if that is proper.
I'm sorry I didn't have time to make envelop be able to aware of balancing stuff, will it be possible to make it as a future enhancement?
Thanks for your review!



Best Regards, Zheng, Huan(ZBT)

OTC/SSD/SSG

Intel Asia-Pacific Research & Developement Ltd

Tel: 021-6116 6435

Inet: 8821 6435

Cub: 3W035

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20090716/664d959c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-volume-ramping-feature-envelop-fix.patch
Type: application/octet-stream
Size: 18499 bytes
Desc: 0001-Add-volume-ramping-feature-envelop-fix.patch
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20090716/664d959c/attachment.obj>


More information about the pulseaudio-discuss mailing list