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

Qt4: control aout through playlist

parent 3a03d629
...@@ -170,16 +170,16 @@ void ActionsManager::frame() ...@@ -170,16 +170,16 @@ void ActionsManager::frame()
void ActionsManager::toggleMuteAudio() void ActionsManager::toggleMuteAudio()
{ {
aout_ToggleMute( p_intf, NULL ); aout_ToggleMute( THEPL, NULL );
} }
void ActionsManager::AudioUp() void ActionsManager::AudioUp()
{ {
aout_VolumeUp( p_intf, 1, NULL ); aout_VolumeUp( THEPL, 1, NULL );
} }
void ActionsManager::AudioDown() void ActionsManager::AudioDown()
{ {
aout_VolumeDown( p_intf, 1, NULL ); aout_VolumeDown( THEPL, 1, NULL );
} }
...@@ -133,7 +133,9 @@ void SoundWidget::updateVolume( int i_sliderVolume ) ...@@ -133,7 +133,9 @@ void SoundWidget::updateVolume( int i_sliderVolume )
if( !b_my_volume ) if( !b_my_volume )
{ {
int i_res = i_sliderVolume * (AOUT_VOLUME_MAX / 2) / VOLUME_MAX; int i_res = i_sliderVolume * (AOUT_VOLUME_MAX / 2) / VOLUME_MAX;
aout_VolumeSet( p_intf, i_res ); playlist_t *p_playlist = pl_Hold( p_intf );
aout_VolumeSet( p_playlist, i_res );
pl_Release( p_intf );
} }
if( i_sliderVolume == 0 ) if( i_sliderVolume == 0 )
{ {
...@@ -154,7 +156,10 @@ void SoundWidget::updateVolume() ...@@ -154,7 +156,10 @@ void SoundWidget::updateVolume()
{ {
/* Audio part */ /* Audio part */
audio_volume_t i_volume; audio_volume_t i_volume;
aout_VolumeGet( p_intf, &i_volume ); playlist_t *p_playlist = pl_Hold( p_intf );
aout_VolumeGet( p_playlist, &i_volume );
pl_Release( p_intf );
i_volume = ( ( i_volume + 1 ) * VOLUME_MAX )/ (AOUT_VOLUME_MAX/2); i_volume = ( ( i_volume + 1 ) * VOLUME_MAX )/ (AOUT_VOLUME_MAX/2);
int i_gauge = volumeSlider->value(); int i_gauge = volumeSlider->value();
b_my_volume = false; b_my_volume = false;
...@@ -184,7 +189,10 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) ...@@ -184,7 +189,10 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
} }
else else
{ {
aout_ToggleMute( p_intf, NULL ); playlist_t *p_playlist = pl_Hold( p_intf );
aout_ToggleMute( p_playlist, NULL );
pl_Release( p_intf );
} }
e->accept(); e->accept();
return true; return true;
......
...@@ -923,12 +923,9 @@ void Equalizer::updateUIFromCore() ...@@ -923,12 +923,9 @@ void Equalizer::updateUIFromCore()
void Equalizer::enable() void Equalizer::enable()
{ {
bool en = ui.enableCheck->isChecked(); bool en = ui.enableCheck->isChecked();
aout_EnableFilter( VLC_OBJECT( p_intf ), "equalizer", aout_EnableFilter( THEPL, "equalizer", en );
en ? true : false ); // aout_EnableFilter( THEPL, "upmixer", en );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "upmixer", // aout_EnableFilter( THEPL, "vsurround", en );
// en ? true : false );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "vsurround",
// en ? true : false );
enable( en ); enable( en );
if( presetsComboBox->currentIndex() < 0 ) if( presetsComboBox->currentIndex() < 0 )
......
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