diff options
Diffstat (limited to 'kmix/mdwslider.cpp')
-rw-r--r-- | kmix/mdwslider.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/kmix/mdwslider.cpp b/kmix/mdwslider.cpp index 042f3723..6b4c3f51 100644 --- a/kmix/mdwslider.cpp +++ b/kmix/mdwslider.cpp @@ -760,15 +760,7 @@ void MDWSlider::setDisabled( bool value ) */ void MDWSlider::increaseVolume() { - Volume vol = m_mixdevice->getVolume(); - long inc = vol.maxVolume() / 20; - if ( inc == 0 ) - inc = 1; - for ( int i = 0; i < vol.count(); i++ ) { - long newVal = (vol[i]) + inc; - m_mixdevice->setVolume( i, newVal < vol.maxVolume() ? newVal : vol.maxVolume() ); - } - m_mixer->commitVolumeChange(m_mixdevice); + m_mixer->increaseVolume(m_mixdevice->num(), 5); } /** @@ -777,15 +769,7 @@ void MDWSlider::increaseVolume() */ void MDWSlider::decreaseVolume() { - Volume vol = m_mixdevice->getVolume(); - long inc = vol.maxVolume() / 20; - if ( inc == 0 ) - inc = 1; - for ( int i = 0; i < vol.count(); i++ ) { - long newVal = (vol[i]) - inc; - m_mixdevice->setVolume( i, newVal > 0 ? newVal : 0 ); - } - m_mixer->commitVolumeChange(m_mixdevice); + m_mixer->decreaseVolume(m_mixdevice->num(), 5); } |