From kde-multimedia Sun Aug 27 21:08:00 2000 From: Stefan Schimanski <1Stein () gmx ! de> Date: Sun, 27 Aug 2000 21:08:00 +0000 To: kde-multimedia Subject: Re: volume scale X-MARC-Message: https://marc.info/?l=kde-multimedia&m=96741037531367 Am Sun, 27 Aug 2000 schrieb Stefan Westerfeld: > Hi! > > On Sun, Aug 27, 2000 at 10:32:11PM +0200, Stefan Schimanski wrote: > > I have to convert the volume value in kaiman into the format aRts uses in > > its volume control. kaiman uses percent values at the moment. Which scale > > is used by aRts? Anything like dB? The current code in Kaiman seems to be > > wrong. > > Plain multiplication, so it multiplies each sample with scaleFactor. This > means that 0.0 is silence, 1.0 is unchanged volume. So with one client > playing an mp3, anything beyond 1.0 will probably give clipping. Ah, easier than I thought :) Then this should be correct to convert the percent value into aRts volume, shouldn't it? if ( vol<0 ) vol=0; if ( vol>=100 ) vol=100; _volumeControl.scaleFactor(vol/100.0); cu Schimmi _______________________________________________ Kde-multimedia mailing list Kde-multimedia@master.kde.org http://master.kde.org/mailman/listinfo/kde-multimedia