Commit fb51fe1d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: try to cleanup use of AOUT_VOLUME_* and QT_VOLUME_*

parent 5d4a883d
...@@ -152,7 +152,7 @@ void SoundWidget::userUpdateVolume( int i_sliderVolume ) ...@@ -152,7 +152,7 @@ void SoundWidget::userUpdateVolume( int i_sliderVolume )
/* Only if volume is set by user action on slider */ /* Only if volume is set by user action on slider */
setMuted( false ); setMuted( false );
playlist_t *p_playlist = pl_Get( p_intf ); playlist_t *p_playlist = pl_Get( p_intf );
int i_res = i_sliderVolume * (AOUT_VOLUME_MAX / 2) / VOLUME_MAX; int i_res = i_sliderVolume * QT_VOLUME_MAX / VOLUME_MAX;
aout_VolumeSet( p_playlist, i_res ); aout_VolumeSet( p_playlist, i_res );
refreshLabels(); refreshLabels();
} }
...@@ -165,7 +165,7 @@ void SoundWidget::libUpdateVolume() ...@@ -165,7 +165,7 @@ void SoundWidget::libUpdateVolume()
playlist_t *p_playlist = pl_Get( p_intf ); playlist_t *p_playlist = pl_Get( p_intf );
i_volume = aout_VolumeGet( p_playlist ); i_volume = aout_VolumeGet( p_playlist );
i_volume = ( ( i_volume + 1 ) * VOLUME_MAX )/ (AOUT_VOLUME_MAX/2); i_volume = ((i_volume + 1) * VOLUME_MAX ) / QT_VOLUME_MAX;
if ( i_volume - volumeSlider->value() != 0 ) if ( i_volume - volumeSlider->value() != 0 )
{ {
......
...@@ -67,7 +67,7 @@ private slots: ...@@ -67,7 +67,7 @@ private slots:
void updateButtonIcons( bool, bool ); void updateButtonIcons( bool, bool );
}; };
#define VOLUME_MAX 200 #define VOLUME_MAX (QT_VOLUME_MAX * 100 / QT_VOLUME_DEFAULT)
class SoundWidget : public QWidget class SoundWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment