> 2011/10/18 Wang Xingchao <xingchao.wang at intel.com>: >> if all channels have same volume setting, use fast way to >> do volume change. this patch intended to work for two formats: >> s16ne/s16re. I did some work to optimize svolume already, see my branch on github: https://github.com/mkbosmans/pulseaudio/compare/master...orcify After a few pending patches that I have already sent to the list are pulled, I plan to submit this branch in parts. (the branch needs to be rebased after the pending patches are committed) For testing correctness of your volume implementation (and performance, as Tanu suggested) you can use the svolume-test program added in this commit: https://github.com/mkbosmans/pulseaudio/commit/cf0c5c9ad47ba0434b0518ca79ca802d0e62153a The Orc svolume implementation currently only handles 1ch s16ne (the orcify branch also adds 1ch float), so I added a similar test for identical channel volumes for the Orc case: https://github.com/mkbosmans/pulseaudio/commit/8659d08f22ccaba0c1ca18c0b29744318bf4fe08 I like that way (only using one extra variable) a bit better than yours (with both same_vol and fast_vol added), but that is not really important. 2011/10/18 Wang Xingchao <wangxingchao2011 at gmail.com>: > Hi all, > > I didnot touch much formats optermization, only for most used > s16nr/re, please help review whether the idea is acceptable. If so, i > will take the responsbility for all formats. I'd say only float32ne is another candidate. Maarten