On Sat, 2011-03-05 at 11:08 +0000, Colin Guthrie wrote: > 'Twas brillig, and Tarantism at 04/03/11 22:23 did gyre and gimble: > > I need to implement a volume scaling in a pulse module. > > I have 0-100 input values. > > What algorithm does pulse usually implement for this so that I can match > > it? > > Can you explain a little more what you're trying to do? You shouldn't > generally need to worry about volume scaling in PA modules. The module is a signal source for the default sink (based on module-sine.c) so it creates a sink_input and provides pop (etc) callbacks for that. I'm using it to produce low latency sound on Maemo. I had expected that system volume would be handled downstream of the sink_input but changing system volume has no effect. I've managed to hook up to the system volume level by dbus and just want to know how to scale my data correctly. At the moment I'm getting reasonable results by y = y * x^4 where 0 <= x <= 100 but I wondered if pulse has some other algorithm available?