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()
void ActionsManager::toggleMuteAudio()
{
aout_ToggleMute( p_intf, NULL );
aout_ToggleMute( THEPL, NULL );
}
void ActionsManager::AudioUp()
{
aout_VolumeUp( p_intf, 1, NULL );
aout_VolumeUp( THEPL, 1, NULL );
}
void ActionsManager::AudioDown()
{
aout_VolumeDown( p_intf, 1, NULL );
aout_VolumeDown( THEPL, 1, NULL );
}
......@@ -133,7 +133,9 @@ void SoundWidget::updateVolume( int i_sliderVolume )
if( !b_my_volume )
{
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 )
{
......@@ -154,7 +156,10 @@ void SoundWidget::updateVolume()
{
/* Audio part */
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);
int i_gauge = volumeSlider->value();
b_my_volume = false;
......@@ -184,7 +189,10 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
}
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();
return true;
......
......@@ -923,12 +923,9 @@ void Equalizer::updateUIFromCore()
void Equalizer::enable()
{
bool en = ui.enableCheck->isChecked();
aout_EnableFilter( VLC_OBJECT( p_intf ), "equalizer",
en ? true : false );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "upmixer",
// en ? true : false );
// aout_EnableFilter( VLC_OBJECT( p_intf ), "vsurround",
// en ? true : false );
aout_EnableFilter( THEPL, "equalizer", en );
// aout_EnableFilter( THEPL, "upmixer", en );
// aout_EnableFilter( THEPL, "vsurround", en );
enable( en );
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