diff options
Diffstat (limited to 'kmix/volume.cpp')
-rw-r--r-- | kmix/volume.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kmix/volume.cpp b/kmix/volume.cpp index d2eb4314..99dd180b 100644 --- a/kmix/volume.cpp +++ b/kmix/volume.cpp @@ -34,9 +34,9 @@ int Volume::_channelMaskEnum[10] = MCUSTOM1, MCUSTOM2 }; -Volume::Volume( ChannelMask chtqmask, long maxVolume, long minVolume, bool isCapture ) +Volume::Volume( ChannelMask chmask, long maxVolume, long minVolume, bool isCapture ) { - init(chtqmask, maxVolume, minVolume, isCapture); + init(chmask, maxVolume, minVolume, isCapture); } @@ -56,22 +56,22 @@ Volume::Volume( int channels, long maxVolume ) { Volume::Volume( const Volume &v ) { - _chtqmask = v._chtqmask; + _chmask = v._chmask; _maxVolume = v._maxVolume; _minVolume = v._minVolume; _muted = v._muted; _isCapture = v._isCapture; - setVolume(v, (ChannelMask)v._chtqmask); + setVolume(v, (ChannelMask)v._chmask); // kdDebug(67100) << "Volume::copy-constructor initialized " << v << "\n"; } -void Volume::init( ChannelMask chtqmask, long maxVolume, long minVolume, bool isCapture ) +void Volume::init( ChannelMask chmask, long maxVolume, long minVolume, bool isCapture ) { for ( int i=0; i<= Volume::CHIDMAX; i++ ) { _volumes[i] = 0; } - _chtqmask = chtqmask; + _chmask = chmask; _maxVolume = maxVolume; _minVolume = minVolume; _isCapture = isCapture; @@ -82,7 +82,7 @@ void Volume::init( ChannelMask chtqmask, long maxVolume, long minVolume, bool is void Volume::setAllVolumes(long vol) { for ( int i=0; i<= Volume::CHIDMAX; i++ ) { - if ( (_channelMaskEnum[i]) & _chtqmask ) { + if ( (_channelMaskEnum[i]) & _chmask ) { // we are supposed to set it _volumes[i] = volrange(vol); } @@ -106,17 +106,17 @@ void Volume::setVolume( ChannelID chid, long vol) */ void Volume::setVolume(const Volume &v) { - setVolume(v, (ChannelMask)(v._chtqmask&_chtqmask) ); + setVolume(v, (ChannelMask)(v._chmask&_chmask) ); } /** * Copy the volume elements contained in v to this Volume object. * Only those elments are copied, that are supported in BOTH Volume objects - * and match the ChannelMask given by chtqmask. + * and match the ChannelMask given by chmask. */ -void Volume::setVolume(const Volume &v, ChannelMask chtqmask) { +void Volume::setVolume(const Volume &v, ChannelMask chmask) { for ( int i=0; i<= Volume::CHIDMAX; i++ ) { - if ( _channelMaskEnum[i] & _chtqmask & (int)chtqmask ) { + if ( _channelMaskEnum[i] & _chmask & (int)chmask ) { // we are supposed to copy it _volumes[i] = volrange(v._volumes[i]); } @@ -149,8 +149,8 @@ long Volume::getVolume(ChannelID chid) { } else { // check if channel is supported - int chtqmask = _channelMaskEnum[chid]; - if ( (chtqmask & _chtqmask) != 0 ) { + int chmask = _channelMaskEnum[chid]; + if ( (chmask & _chmask) != 0 ) { // channel is supported vol = _volumes[chid]; } @@ -162,11 +162,11 @@ long Volume::getVolume(ChannelID chid) { return vol; } -long Volume::getAvgVolume(ChannelMask chtqmask) { +long Volume::getAvgVolume(ChannelMask chmask) { int avgVolumeCounter = 0; long long sumOfActiveVolumes = 0; for ( int i=0; i<= Volume::CHIDMAX; i++ ) { - if ( (_channelMaskEnum[i] & _chtqmask) & (int)chtqmask ) { + if ( (_channelMaskEnum[i] & _chmask) & (int)chmask ) { avgVolumeCounter++; sumOfActiveVolumes += _volumes[i]; } @@ -180,10 +180,10 @@ long Volume::getAvgVolume(ChannelMask chtqmask) { return (long)sumOfActiveVolumes; } -long Volume::getTopStereoVolume(ChannelMask chtqmask) { +long Volume::getTopStereoVolume(ChannelMask chmask) { long long topVolumeCount = 0; for ( int i=0; i<= Volume::CHIDMAX; i++ ) { - if ( (_channelMaskEnum[i] & _chtqmask) & (int)chtqmask ) { + if ( (_channelMaskEnum[i] & _chmask) & (int)chmask ) { if ( topVolumeCount < _volumes[i] ) topVolumeCount = _volumes[i]; } @@ -194,7 +194,7 @@ long Volume::getTopStereoVolume(ChannelMask chtqmask) { int Volume::count() { int counter = 0; for ( int i=0; i<= Volume::CHIDMAX; i++ ) { - if ( _channelMaskEnum[i] & _chtqmask ) { + if ( _channelMaskEnum[i] & _chmask ) { counter++; } } @@ -225,7 +225,7 @@ std::ostream& operator<<(std::ostream& os, const Volume& vol) { if ( i != 0 ) { os << ","; } - if ( Volume::_channelMaskEnum[i] & vol._chtqmask ) { + if ( Volume::_channelMaskEnum[i] & vol._chmask ) { // supported channel: Print Volume os << vol._volumes[i]; } @@ -248,7 +248,7 @@ kdbgstream& operator<<(kdbgstream &os, const Volume& vol) { if ( i != 0 ) { os << ","; } - if ( Volume::_channelMaskEnum[i] & vol._chtqmask ) { + if ( Volume::_channelMaskEnum[i] & vol._chmask ) { // supported channel: Print Volume os << vol._volumes[i]; } |