[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: volume scale
From: Stefan Schimanski <1Stein () gmx ! de>
Date: 2000-08-27 21:08:00
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic