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

playlist: use playlist audio functions

And get rid of the horrible find-input-callback.
parent 617abeec
......@@ -31,7 +31,6 @@
#include <vlc_common.h>
#include <vlc_playlist.h>
#include <vlc_interface.h>
#include <vlc_aout_intf.h>
#include <math.h>
......@@ -167,7 +166,7 @@ DBUS_METHOD( Seek )
static void
MarshalVolume( intf_thread_t *p_intf, DBusMessageIter *container )
{
float f_vol = aout_VolumeGet( p_intf->p_sys->p_playlist );
float f_vol = playlist_VolumeGet( p_intf->p_sys->p_playlist );
if( f_vol < 0.f )
f_vol = 1.f; /* ? */
......@@ -204,7 +203,7 @@ DBUS_METHOD( VolumeSet )
d_dbus_vol *= AOUT_VOLUME_DEFAULT;
if( d_dbus_vol < 0. )
d_dbus_vol = 0.;
aout_VolumeSet( PL, d_dbus_vol );
playlist_VolumeSet( PL, d_dbus_vol );
REPLY_SEND;
}
......
......@@ -33,7 +33,6 @@
#include <vlc_plugin.h>
#include <vlc_interface.h>
#include <vlc_vout.h>
#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include <assert.h>
......@@ -263,18 +262,18 @@ static void ProcessGesture( intf_thread_t *p_intf )
case UP:
msg_Dbg(p_intf, "Louder");
aout_VolumeUp( p_playlist, 1, NULL );
playlist_VolumeUp( p_playlist, 1, NULL );
break;
case DOWN:
msg_Dbg(p_intf, "Quieter");
aout_VolumeDown( p_playlist, 1, NULL );
playlist_VolumeDown( p_playlist, 1, NULL );
break;
case GESTURE(UP,DOWN,NONE,NONE):
case GESTURE(DOWN,UP,NONE,NONE):
msg_Dbg( p_intf, "Mute sound" );
aout_MuteToggle( p_playlist );
playlist_MuteToggle( p_playlist );
break;
case GESTURE(UP,RIGHT,NONE,NONE):
......
......@@ -35,7 +35,6 @@
#include <vlc_interface.h>
#include <vlc_input.h>
#include <vlc_vout.h>
#include <vlc_aout_intf.h>
#include <vlc_osd.h>
#include <vlc_playlist.h>
#include <vlc_keys.h>
......@@ -187,7 +186,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
case ACTIONID_VOL_UP:
{
float vol;
if( aout_VolumeUp( p_playlist, 1, &vol ) == 0 )
if( playlist_VolumeUp( p_playlist, 1, &vol ) == 0 )
DisplayVolume( p_intf, p_vout, vol );
break;
}
......@@ -195,16 +194,16 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
case ACTIONID_VOL_DOWN:
{
float vol;
if( aout_VolumeDown( p_playlist, 1, &vol ) == 0 )
if( playlist_VolumeDown( p_playlist, 1, &vol ) == 0 )
DisplayVolume( p_intf, p_vout, vol );
break;
}
case ACTIONID_VOL_MUTE:
if( aout_MuteToggle( p_playlist ) == 0 )
if( playlist_MuteToggle( p_playlist ) == 0 )
{
float vol = aout_VolumeGet( p_playlist );
if( aout_MuteGet( p_playlist ) > 0 || vol == 0.f )
float vol = playlist_VolumeGet( p_playlist );
if( playlist_MuteGet( p_playlist ) > 0 || vol == 0.f )
{
ClearChannels( p_intf, p_vout );
DisplayIcon( p_vout, OSD_MUTE_ICON );
......
......@@ -39,7 +39,6 @@
#include <math.h>
#include <vlc_interface.h>
#include <vlc_aout_intf.h>
#include <vlc_vout.h>
#include <vlc_osd.h>
#include <vlc_playlist.h>
......@@ -1422,7 +1421,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
}
}
float volume = aout_VolumeGet( p_playlist );
float volume = playlist_VolumeGet( p_playlist );
if( volume >= 0.f )
msg_rc( STATUS_CHANGE "( audio volume: %ld )",
lroundf(volume * AOUT_VOLUME_DEFAULT) );
......@@ -1504,17 +1503,17 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd,
{
/* Set. */
int i_volume = atoi( newval.psz_string );
if( !aout_VolumeSet( p_playlist,
if( !playlist_VolumeSet( p_playlist,
i_volume / (float)AOUT_VOLUME_DEFAULT ) )
i_error = VLC_SUCCESS;
aout_MuteSet( p_playlist, i_volume == 0 );
playlist_MuteSet( p_playlist, i_volume == 0 );
msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
}
else
{
/* Get. */
msg_rc( STATUS_CHANGE "( audio volume: %ld )",
lroundf( aout_VolumeGet( p_playlist ) * AOUT_VOLUME_DEFAULT ) );
lroundf( playlist_VolumeGet( p_playlist ) * AOUT_VOLUME_DEFAULT ) );
i_error = VLC_SUCCESS;
}
......@@ -1545,7 +1544,7 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd,
if( !strcmp(psz_cmd, "voldown") )
i_nb_steps *= -1;
if( aout_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &volume ) < 0 )
if( playlist_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &volume ) < 0 )
i_error = VLC_EGENERIC;
if ( !i_error )
......
......@@ -33,7 +33,6 @@
#import "SharedDialogs.h"
#import <vlc_common.h>
#import <vlc_aout_intf.h>
#import <vlc_strings.h>
#import <math.h>
......@@ -180,7 +179,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
}
if (p_aout) {
aout_EnableFilter(pl_Get(p_intf), psz_name, b_on);
playlist_EnableAudioFilter(pl_Get(p_intf), psz_name, b_on);
vlc_object_release(p_aout);
}
}
......@@ -228,13 +227,13 @@ static VLCAudioEffects *_o_sharedInstance = nil;
if (p_aout) {
/* disable existing filters */
aout_EnableFilter(p_playlist, "equalizer", false);
aout_EnableFilter(p_playlist, "compressor", false);
aout_EnableFilter(p_playlist, "spatializer", false);
aout_EnableFilter(p_playlist, "compressor", false);
aout_EnableFilter(p_playlist, "headphone", false);
aout_EnableFilter(p_playlist, "normvol", false);
aout_EnableFilter(p_playlist, "karaoke", false);
playlist_EnableAudioFilter(p_playlist, "equalizer", false);
playlist_EnableAudioFilter(p_playlist, "compressor", false);
playlist_EnableAudioFilter(p_playlist, "spatializer", false);
playlist_EnableAudioFilter(p_playlist, "compressor", false);
playlist_EnableAudioFilter(p_playlist, "headphone", false);
playlist_EnableAudioFilter(p_playlist, "normvol", false);
playlist_EnableAudioFilter(p_playlist, "karaoke", false);
}
/* fetch preset */
......@@ -257,7 +256,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count];
for (NSUInteger x = 0; x < count; x++)
aout_EnableFilter(p_playlist, (char *)[[tempArray objectAtIndex:x] UTF8String], true);
playlist_AudioEnableFilter(p_playlist, (char *)[[tempArray objectAtIndex:x] UTF8String], true);
}
}
config_PutPsz(p_intf,"audio-filter",[tempString UTF8String]);
......
......@@ -28,8 +28,6 @@
#import "MainMenu.h"
#import "fspanel.h"
#import <vlc_aout_intf.h>
/*****************************************************************************
* VLCControlsBarCommon
*
......@@ -968,4 +966,4 @@ else \
[o_fspanel setStreamPos:[o_time_sld floatValue] andTime: [o_time_fld stringValue]];
}
@end
\ No newline at end of file
@end
......@@ -30,7 +30,6 @@
#import <vlc_input.h>
#import <vlc_keys.h>
#import <vlc_osd.h>
#import <vlc_aout_intf.h>
#import <vlc/vlc.h>
#import <vlc_strings.h>
#import <vlc_url.h>
......@@ -424,7 +423,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return;
aout_VolumeUp(pl_Get(p_intf), 1, NULL);
playlist_VolumeUp(pl_Get(p_intf), 1, NULL);
}
- (void)volumeDown
......@@ -433,7 +432,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return;
aout_VolumeDown(pl_Get(p_intf), 1, NULL);
playlist_VolumeDown(pl_Get(p_intf), 1, NULL);
}
- (void)toggleMute
......@@ -442,7 +441,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return;
aout_MuteToggle(pl_Get(p_intf));
playlist_MuteToggle(pl_Get(p_intf));
}
- (void)setMute:(BOOL)b_value
......@@ -451,7 +450,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return;
aout_MuteSet(pl_Get(p_intf), b_value);
playlist_MuteSet(pl_Get(p_intf), b_value);
}
- (BOOL)mute
......@@ -461,7 +460,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return NO;
BOOL b_is_muted = NO;
b_is_muted = aout_MuteGet(pl_Get(p_intf)) > 0;
b_is_muted = playlist_MuteGet(pl_Get(p_intf)) > 0;
return b_is_muted;
}
......@@ -472,7 +471,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return 0;
float volume = aout_VolumeGet(pl_Get(p_intf));
float volume = playlist_VolumeGet(pl_Get(p_intf));
return lroundf(volume * AOUT_VOLUME_DEFAULT);
}
......@@ -483,7 +482,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
if (!p_intf)
return;
aout_VolumeSet(pl_Get(p_intf), i_value / (float)AOUT_VOLUME_DEFAULT);
playlist_VolumeSet(pl_Get(p_intf), i_value / (float)AOUT_VOLUME_DEFAULT);
}
#pragma mark -
......
......@@ -36,11 +36,9 @@
#import "SideBarItem.h"
#import <math.h>
#import <vlc_playlist.h>
#import <vlc_aout_intf.h>
#import <vlc_url.h>
#import <vlc_strings.h>
#import <vlc_services_discovery.h>
#import <vlc_aout_intf.h>
#import "ControlsBar.h"
#import "VideoView.h"
......
......@@ -28,7 +28,6 @@
#include "intf.h"
#include "applescript.h"
#include "CoreInteraction.h"
#include "vlc_aout_intf.h"
/*****************************************************************************
* VLGetURLScriptCommand implementation
......
......@@ -31,7 +31,6 @@
#import "misc.h"
#import "fspanel.h"
#import "CompatibilityFixes.h"
#import <vlc_aout_intf.h>
@interface VLCFSPanel ()
- (void)hideMouse;
......
......@@ -40,7 +40,6 @@
#include <vlc_url.h>
#include <vlc_modules.h>
#include <vlc_plugin.h>
#include <vlc_aout_intf.h>
#include <vlc_vout_display.h>
#include <unistd.h> /* execl() */
......
......@@ -29,7 +29,6 @@
#import "prefs.h"
#import <vlc_keys.h>
#import <vlc_interface.h>
#import <vlc_aout_intf.h>
#import <vlc_dialog.h>
#import <vlc_modules.h>
#import <vlc_plugin.h>
......
......@@ -48,7 +48,6 @@
#include <vlc_interface.h>
#include <vlc_vout.h>
#include <vlc_aout_intf.h>
#include <vlc_charset.h>
#include <vlc_input.h>
#include <vlc_es.h>
......@@ -1090,7 +1089,7 @@ static int DrawStatus(intf_thread_t *intf)
mvnprintw(y++, 0, COLS, _(" Position : %s/%s"), buf1, buf2);
volume = aout_VolumeGet(p_playlist);
volume =playlist_VolumeGet(p_playlist);
if (volume >= 0.f)
mvnprintw(y++, 0, COLS, _(" Volume : %3ld%%"),
lroundf(volume * 100.f));
......@@ -1608,8 +1607,8 @@ static void HandleCommonKey(intf_thread_t *intf, int key)
case 'p': playlist_Prev(p_playlist); break;
case 'n': playlist_Next(p_playlist); break;
case 'a': aout_VolumeUp(p_playlist, 1, NULL); break;
case 'z': aout_VolumeDown(p_playlist, 1, NULL); break;
case 'a': playlist_VolumeUp(p_playlist, 1, NULL); break;
case 'z': playlist_VolumeDown(p_playlist, 1, NULL); break;
case 0x0c: /* ^l */
case KEY_CLEAR:
......
......@@ -27,7 +27,6 @@
#endif
#include <vlc_vout.h>
#include <vlc_aout_intf.h>
#include <vlc_keys.h>
#include "actions_manager.hpp"
......@@ -179,17 +178,17 @@ void ActionsManager::frame()
void ActionsManager::toggleMuteAudio()
{
aout_MuteToggle( THEPL );
playlist_MuteToggle( THEPL );
}
void ActionsManager::AudioUp()
{
aout_VolumeUp( THEPL, 1, NULL );
playlist_VolumeUp( THEPL, 1, NULL );
}
void ActionsManager::AudioDown()
{
aout_VolumeDown( THEPL, 1, NULL );
playlist_VolumeDown( THEPL, 1, NULL );
}
void ActionsManager::skipForward()
......
......@@ -32,7 +32,6 @@
#include "util/input_slider.hpp" /* SoundSlider */
#include <math.h>
#include <vlc_aout_intf.h> /* Volume functions */
#include <QLabel>
#include <QHBoxLayout>
......@@ -108,10 +107,10 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
layout->addWidget( volumeSlider, 0, Qt::AlignBottom );
/* Set the volume from the config */
float volume = aout_VolumeGet( THEPL );
float volume = playlist_VolumeGet( THEPL );
libUpdateVolume( (volume >= 0.f) ? volume : 1.f );
/* Sync mute status */
if( aout_MuteGet( THEPL ) > 0 )
if( playlist_MuteGet( THEPL ) > 0 )
updateMuteStatus( true );
/* Volume control connection */
......@@ -152,7 +151,7 @@ void SoundWidget::userUpdateVolume( int i_sliderVolume )
{
/* Only if volume is set by user action on slider */
setMuted( false );
aout_VolumeSet( THEPL, i_sliderVolume / 100.f );
playlist_VolumeSet( THEPL, i_sliderVolume / 100.f );
refreshLabels();
}
......@@ -197,7 +196,7 @@ void SoundWidget::setMuted( bool mute )
{
b_is_muted = mute;
playlist_t *p_playlist = pl_Get( p_intf );
aout_MuteSet( VLC_OBJECT(p_playlist), mute );
playlist_MuteSet( p_playlist, mute );
}
bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
......
......@@ -45,7 +45,6 @@
#include "util/qt_dirs.hpp"
#include "../../audio_filter/equalizer_presets.h"
#include <vlc_aout_intf.h>
#include <vlc_intf_strings.h>
#include <vlc_vout.h>
#include <vlc_osd.h>
......@@ -1054,9 +1053,9 @@ void Equalizer::changeFreqLabels( bool b_useVlcBands )
void Equalizer::enable()
{
bool en = ui.enableCheck->isChecked();
aout_EnableFilter( THEPL, "equalizer", en );
// aout_EnableFilter( THEPL, "upmixer", en );
// aout_EnableFilter( THEPL, "vsurround", en );
playlist_EnableAudioFilter( THEPL, "equalizer", en );
//playlist_EnableAudioFilter( THEPL, "upmixer", en );
//playlist_EnableAudioFilter( THEPL, "vsurround", en );
enable( en );
if( presetsComboBox->currentIndex() < 0 )
......@@ -1334,7 +1333,7 @@ Compressor::Compressor( intf_thread_t *_p_intf, QWidget *_parent )
void Compressor::enable()
{
bool en = enableCheck->isChecked();
aout_EnableFilter( THEPL, "compressor", en );
playlist_EnableAudioFilter( THEPL, "compressor", en );
enable( en );
}
......@@ -1474,7 +1473,7 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
void Spatializer::enable()
{
bool en = enableCheck->isChecked();
aout_EnableFilter( THEPL, "spatializer", en );
playlist_EnableAudioFilter( THEPL, "spatializer", en );
enable( en );
}
......
......@@ -33,7 +33,6 @@
#include <vlc_config_cat.h>
#include <vlc_configuration.h>
#include <vlc_aout_intf.h>
#include <QString>
#include <QFont>
......
......@@ -35,7 +35,6 @@
#include <vlc_url.h>
#include <vlc_strings.h>
#include <vlc_aout.h>
#include <vlc_aout_intf.h>
#include <QApplication>
#include <QFile>
......
......@@ -39,7 +39,6 @@
#include "recents.hpp" /* Recents Item destruction */
#include "util/qvlcapp.hpp" /* QVLCApplication definition */
#include "components/playlist/playlist_model.hpp" /* for ~PLModel() */
#include <vlc_aout_intf.h>
#ifdef Q_WS_X11
#include <vlc_xlib.h>
......
......@@ -31,7 +31,6 @@
#include "util/input_slider.hpp"
#include "adapters/seekpoints.hpp"
#include <vlc_aout_intf.h>
#include <QPaintEvent>
#include <QPainter>
......
......@@ -25,14 +25,13 @@
#include "../src/vlcproc.hpp"
#include <vlc_playlist.h>
#include <vlc_input.h>
#include <vlc_aout_intf.h>
#include <string>
void CmdSetEqualizer::execute()
{
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
aout_EnableFilter( pPlaylist, "equalizer", m_enable );
playlist_EnableAudioFilter( pPlaylist, "equalizer", m_enable );
VlcProc::instance( getIntf() )->update_equalizer();
}
......
......@@ -24,7 +24,6 @@
#include "cmd_input.hpp"
#include "cmd_dialogs.hpp"
#include <vlc_aout_intf.h>
#include <vlc_input.h>
#include <vlc_playlist.h>
......@@ -102,18 +101,18 @@ void CmdFaster::execute()
void CmdMute::execute()
{
aout_MuteToggle( getIntf()->p_sys->p_playlist );
playlist_MuteToggle( getIntf()->p_sys->p_playlist );
}
void CmdVolumeUp::execute()
{
aout_VolumeUp( getIntf()->p_sys->p_playlist, 1, NULL );
playlist_VolumeUp( getIntf()->p_sys->p_playlist, 1, NULL );
}
void CmdVolumeDown::execute()
{
aout_VolumeDown( getIntf()->p_sys->p_playlist, 1, NULL );
playlist_VolumeDown( getIntf()->p_sys->p_playlist, 1, NULL );
}
......@@ -29,7 +29,6 @@
#include <vlc_common.h>
#include <vlc_aout.h>
#include <vlc_aout_intf.h>
#include <vlc_vout.h>
#include <vlc_playlist.h>
#include <vlc_url.h>
......@@ -694,7 +693,7 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal )
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
SET_VOLUME( m_cVarVolume, var_GetFloat( pPlaylist, "volume" ), false );
bool b_is_muted = aout_MuteGet( pPlaylist ) > 0;
bool b_is_muted = playlist_MuteGet( pPlaylist ) > 0;
SET_BOOL( m_cVarMute, b_is_muted );
}
......@@ -798,7 +797,7 @@ void VlcProc::init_variables()
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
SET_VOLUME( m_cVarVolume, var_GetFloat( pPlaylist, "volume" ), false );
bool b_is_muted = aout_MuteGet( pPlaylist ) > 0;
bool b_is_muted = playlist_MuteGet( pPlaylist ) > 0;
SET_BOOL( m_cVarMute, b_is_muted );
update_equalizer();
......
......@@ -28,7 +28,6 @@
#endif
#include <vlc_common.h>
#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include "volume.hpp"
#include <math.h>
......@@ -51,7 +50,7 @@ void Volume::set( float percentage, bool updateVLC )
if( updateVLC )
{
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
aout_VolumeSet( pPlaylist, getVolume() );
playlist_VolumeSet( pPlaylist, getVolume() );
}
}
......
......@@ -34,7 +34,6 @@
#include <vlc_common.h>
#include <vlc_aout.h>
#include <vlc_aout_intf.h>
#include <vlc_input.h>
#include <vlc_charset.h>
......@@ -293,7 +292,7 @@ static int vlclua_equalizer_enable ( lua_State *L )
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
bool state = luaL_checkboolean ( L , 1 );
aout_EnableFilter( p_playlist, "equalizer", state );
playlist_EnableAudioFilter( p_playlist, "equalizer", state );
return 0;
}
/*****************************************************************************
......
......@@ -37,7 +37,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_meta.h>
#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include "../vlc.h"
#include "../libs.h"
......@@ -52,14 +52,14 @@ static int vlclua_volume_set( lua_State *L )
int i_volume = luaL_checkint( L, 1 );
if( i_volume < 0 )
i_volume = 0;
int i_ret = aout_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT );
int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT );
return vlclua_push_ret( L, i_ret );
}
static int vlclua_volume_get( lua_State *L )
{
playlist_t *p_this = vlclua_get_playlist_internal( L );
long i_volume = lroundf(aout_VolumeGet( p_this ) * AOUT_VOLUME_DEFAULT);
long i_volume = lroundf(playlist_VolumeGet( p_this ) * AOUT_VOLUME_DEFAULT);
lua_pushnumber( L, i_volume );
return 1;
}
......@@ -69,7 +69,7 @@ static int vlclua_volume_up( lua_State *L )
playlist_t *p_this = vlclua_get_playlist_internal( L );
float volume;
aout_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume );
playlist_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume );
lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) );
return 1;
}
......@@ -79,7 +79,7 @@ static int vlclua_volume_down( lua_State *L )
playlist_t *p_this = vlclua_get_playlist_internal( L );
float volume;
aout_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume );
playlist_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume );
lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) );
return 1;
}
......
......@@ -36,7 +36,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_cpu.h>
#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include "libvlc.h"
#include "modules/modules.h"
......
......@@ -35,7 +35,7 @@
#include <vlc_osd.h>
#include <vlc_image.h>
#include <vlc_modules.h>
#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include "libvlc.h"
......@@ -171,7 +171,7 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
if( p_osd->p_state->p_volume )
{
/* Update the volume state images to match the current volume */
float vol = aout_VolumeGet( p_this );
float vol = playlist_VolumeGet( pl_Get(p_this) );
if( vol >= 0.f )
{
vol *= (float)AOUT_VOLUME_DEFAULT;
......
......@@ -409,11 +409,6 @@ void set_current_status_node( playlist_t * p_playlist,
pl_priv(p_playlist)->status.p_node = p_node;
}
static input_thread_t *playlist_FindInput( vlc_object_t *object )
{
return playlist_CurrentInput( (playlist_t *)object );
}
static void VariablesInit( playlist_t *p_playlist )
{
/* These variables control updates */
......@@ -466,9 +461,6 @@ static void VariablesInit( playlist_t *p_playlist )
var_Create( p_playlist, "mute", VLC_VAR_BOOL );
var_Create( p_playlist, "volume", VLC_VAR_FLOAT );
var_SetFloat( p_playlist, "volume", -1.f );
/* FIXME: horrible hack for audio output interface code */
var_Create( p_playlist, "find-input-callback", VLC_VAR_ADDRESS );
var_SetAddress( p_playlist, "find-input-callback", playlist_FindInput );
}
playlist_item_t * playlist_CurrentPlayingItem( playlist_t * p_playlist )
......
......@@ -43,7 +43,6 @@
#include <vlc_input.h>
#include <vlc_meta.h>
#include <vlc_playlist.h>
#include <vlc_aout_intf.h>
#include <vlc_strings.h>
#include <vlc_charset.h>
......@@ -776,7 +775,7 @@ char *str_format_meta( playlist_t *p_object, const char *string )
break;
case 'V':
{
float vol = aout_VolumeGet( p_object );
float vol = playlist_VolumeGet( p_object );
if( vol >= 0. )
{
snprintf( buf, 10, "%ld",
......
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