/*****************************************************************************
- * audio_output.h : audio output interface
+ * vlc_aout.h : audio output interface
*****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
- * $Id$
+ * Copyright (C) 2002-2011 the VideoLAN team
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* This file defines functions, structures and macros for audio output object
*/
-# ifdef __cplusplus
-extern "C" {
-# endif
+/* Max number of pre-filters per input, and max number of post-filters */
+#define AOUT_MAX_FILTERS 10
+
+/* Buffers which arrive in advance of more than AOUT_MAX_ADVANCE_TIME
+ * will be considered as bogus and be trashed */
+#define AOUT_MAX_ADVANCE_TIME (DEFAULT_PTS_DELAY * 5)
+
+/* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME
+ * will cause the calling thread to sleep */
+#define AOUT_MAX_PREPARE_TIME (CLOCK_FREQ/2)
+
+/* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed
+ * to avoid too heavy resampling */
+#define AOUT_MIN_PREPARE_TIME (CLOCK_FREQ/25)
+
+/* Max acceptable delay between the coded PTS and the actual presentation
+ * time, without resampling */
+#define AOUT_PTS_TOLERANCE (CLOCK_FREQ/25)
+
+/* Max acceptable resampling (in %) */
+#define AOUT_MAX_RESAMPLING 10
#include "vlc_es.h"
/* From intf.c : */
VLC_API void aout_VolumeSoftInit( aout_instance_t * );
VLC_API void aout_VolumeNoneInit( aout_instance_t * );
-VLC_API audio_volume_t aout_VolumeGet( vlc_object_t * );
-#define aout_VolumeGet(a) aout_VolumeGet(VLC_OBJECT(a))
-VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t );
-#define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b)
-VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
-#define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c)
-VLC_API int aout_VolumeDown( vlc_object_t *, int, audio_volume_t * );
-#define aout_VolumeDown(a, b, c) aout_VolumeDown(VLC_OBJECT(a), b, c)
-VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * );
-#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
-VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
-VLC_API bool aout_IsMuted( vlc_object_t * );
VLC_API int aout_ChannelsRestart( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * );
-VLC_API void aout_EnableFilter(vlc_object_t *, const char *, bool );
-#define aout_EnableFilter( o, n, b ) \
- aout_EnableFilter( VLC_OBJECT(o), n, b )
-
/* */
VLC_API vout_thread_t * aout_filter_RequestVout( filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt ) VLC_USED;
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* _VLC_AOUT_H */
+#endif /* VLC_AOUT_H */
--- /dev/null
+/*****************************************************************************
+ * vlc_aout_intf.h : audio output control
+ *****************************************************************************
+ * Copyright (C) 2002-2011 the VideoLAN team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_AOUT_INTF_H
+#define VLC_AOUT_INTF_H 1
+
+/**
+ * \file
+ * This file defines functions, structures and macros for audio output object
+ */
+
+#define AOUT_VOLUME_DEFAULT 256
+#define AOUT_VOLUME_STEP 32
+#define AOUT_VOLUME_MAX 1024
+#define AOUT_VOLUME_MIN 0
+
+VLC_API audio_volume_t aout_VolumeGet( vlc_object_t * );
+#define aout_VolumeGet(a) aout_VolumeGet(VLC_OBJECT(a))
+VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t );
+#define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b)
+VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
+#define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c)
+VLC_API int aout_VolumeDown( vlc_object_t *, int, audio_volume_t * ) ;
+#define aout_VolumeDown(a, b, c) aout_VolumeDown(VLC_OBJECT(a), b, c)
+VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * );
+#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
+VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
+VLC_API bool aout_IsMuted( vlc_object_t * );
+
+VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool );
+#define aout_EnableFilter( o, n, b ) \
+ aout_EnableFilter( VLC_OBJECT(o), n, b )
+
+#endif /* _VLC_AOUT_H */
* mark it to be presented */
#define DEFAULT_PTS_DELAY (3*CLOCK_FREQ/10)
-/*****************************************************************************
- * Audio configuration
- *****************************************************************************/
-
-/* Volume */
-/* If you are coding an interface, please see src/audio_output/intf.c */
-#define AOUT_VOLUME_DEFAULT 256
-#define AOUT_VOLUME_STEP 32
-#define AOUT_VOLUME_MAX 1024
-#define AOUT_VOLUME_MIN 0
-
-/* Max number of pre-filters per input, and max number of post-filters */
-#define AOUT_MAX_FILTERS 10
-
-/* Buffers which arrive in advance of more than AOUT_MAX_ADVANCE_TIME
- * will be considered as bogus and be trashed */
-#define AOUT_MAX_ADVANCE_TIME (DEFAULT_PTS_DELAY * 5)
-
-/* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME
- * will cause the calling thread to sleep */
-#define AOUT_MAX_PREPARE_TIME (CLOCK_FREQ/2)
-
-/* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed
- * to avoid too heavy resampling */
-#define AOUT_MIN_PREPARE_TIME (CLOCK_FREQ/25)
-
-/* Max acceptable delay between the coded PTS and the actual presentation
- * time, without resampling */
-#define AOUT_PTS_TOLERANCE (CLOCK_FREQ/25)
-
-/* Max acceptable resampling (in %) */
-#define AOUT_MAX_RESAMPLING 10
-
/*****************************************************************************
* SPU configuration
*****************************************************************************/
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_cpu.h>
#include <pulse/pulseaudio.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_charset.h> /* FromLocaleDup, LocaleFree */
#include <vlc_atomic.h>
#include <vlc_common.h>
#include <vlc_interface.h>
-#include <vlc_aout.h>
#include <dbus/dbus.h>
#define DBUS_MPRIS_OBJECT_PATH "/org/mpris/MediaPlayer2"
#include <vlc_common.h>
#include <vlc_playlist.h>
#include <vlc_interface.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <math.h>
#include <vlc_plugin.h>
#include <vlc_interface.h>
#include <vlc_vout.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#ifdef HAVE_UNISTD_H
#include <vlc_interface.h>
#include <vlc_input.h>
#include <vlc_vout.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_osd.h>
#include <vlc_playlist.h>
#include <vlc_keys.h>
vout_thread_t *p_vout = p_input ? input_GetVout( p_input ) : NULL;
/* Update the aout */
- aout_instance_t *p_aout = p_input ? input_GetAout( p_input ) : NULL;
+ vlc_object_t *p_aout = p_input ? (vlc_object_t *)input_GetAout( p_input ) : NULL;
/* Register OSD channels */
/* FIXME: this check can fail if the new vout is reallocated at the same
#include <assert.h>
#include <vlc_interface.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_vout.h>
#include <vlc_osd.h>
#include <vlc_playlist.h>
intf_thread_t *p_intf = (intf_thread_t*)p_this;
input_thread_t *p_input =
playlist_CurrentInput( p_intf->p_sys->p_playlist );
- aout_instance_t * p_aout;
const char * psz_variable;
vlc_value_t val_name;
int i_error;
return VLC_EGENERIC;
}
- p_aout = input_GetAout( p_input );
+ vlc_object_t * p_aout = (vlc_object_t *)input_GetAout( p_input );
vlc_object_release( p_input );
if ( p_aout == NULL )
return VLC_ENOOBJ;
#include <vlc_dialog.h>
#include <vlc_url.h>
#include <vlc_modules.h>
+#include <vlc_aout_intf.h>
#include <unistd.h> /* execl() */
#import "intf.h"
#include <vlc_interface.h>
#include <vlc_vout.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_charset.h>
#include <vlc_input.h>
#include <vlc_es.h>
#endif
#include <vlc_vout.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_keys.h>
#include "actions_manager.hpp"
#include "input_manager.hpp" /* Get notification of Volume Change */
#include "util/input_slider.hpp" /* SoundSlider */
-#include <vlc_aout.h> /* Volume functions */
+#include <vlc_aout_intf.h> /* Volume functions */
#include <QLabel>
#include <QHBoxLayout>
#include "util/qt_dirs.hpp"
#include "../../audio_filter/equalizer_presets.h"
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_intf_strings.h>
#include <vlc_vout.h>
#include <vlc_osd.h>
float f_preamp;
int i_preset;
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
if( p_aout )
{
psz_af = var_GetNonEmptyString( p_aout, "audio-filter" );
/* Function called when the set2Pass button is activated */
void Equalizer::set2Pass()
{
- aout_instance_t *p_aout= THEMIM->getAout();
+ vlc_object_t *p_aout= (vlc_object_t *)THEMIM->getAout();
bool b_2p = ui.eq2PassCheck->isChecked();
if( p_aout )
void Equalizer::setPreamp()
{
const float f = ( float )( ui.preampSlider->value() ) /10 - 20;
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
ui.preampLabel->setText( qtr( "Preamp\n" ) + QString::number( f, 'f', 1 )
+ qtr( "dB" ) );
values += " " + val;
}
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
if( p_aout )
{
//delCallbacks( p_aout );
}
/* Apply presets to audio output */
- aout_instance_t *p_aout= THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
if( p_aout )
{
var_SetString( p_aout , "equalizer-preset" , preset_list[i_preset] );
return VLC_SUCCESS;
}
-void Equalizer::delCallbacks( aout_instance_t *p_aout )
+void Equalizer::delCallbacks( vlc_object_t *p_aout )
{
//var_DelCallback( p_aout, "equalizer-bands", EqzCallback, this );
//var_DelCallback( p_aout, "equalizer-preamp", EqzCallback, this );
var_DelCallback( p_aout, "equalizer-preset", PresetCallback, this );
}
-void Equalizer::addCallbacks( aout_instance_t *p_aout )
+void Equalizer::addCallbacks( vlc_object_t *p_aout )
{
//var_AddCallback( p_aout, "equalizer-bands", EqzCallback, this );
//var_AddCallback( p_aout, "equalizer-preamp", EqzCallback, this );
BUTTONACT( enableCheck, enable() );
/* Write down initial values */
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
char *psz_af;
if( p_aout )
void Compressor::setValues()
{
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
for( int i = 0 ; i < NUM_CP_CTRL ; i++ )
{
BUTTONACT( enableCheck, enable() );
/* Write down initial values */
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
char *psz_af;
if( p_aout )
void Spatializer::setValues()
{
- aout_instance_t *p_aout = THEMIM->getAout();
+ vlc_object_t *p_aout = (vlc_object_t *)THEMIM->getAout();
for( int i = 0 ; i < NUM_SP_CTRL ; i++ )
{
}
}
-void Spatializer::delCallbacks( aout_instance_t *p_aout )
+void Spatializer::delCallbacks( vlc_object_t *p_aout )
{
VLC_UNUSED( p_aout );
// var_DelCallback( p_aout, "Spatializer-bands", EqzCallback, this );
// var_DelCallback( p_aout, "Spatializer-preamp", EqzCallback, this );
}
-void Spatializer::addCallbacks( aout_instance_t *p_aout )
+void Spatializer::addCallbacks( vlc_object_t *p_aout )
{
VLC_UNUSED( p_aout );
// var_AddCallback( p_aout, "Spatializer-bands", EqzCallback, this );
QSlider *bands[BANDS];
QLabel *band_texts[BANDS];
- void delCallbacks( aout_instance_t * );
- void addCallbacks( aout_instance_t * );
+ void delCallbacks( vlc_object_t * );
+ void addCallbacks( vlc_object_t * );
intf_thread_t *p_intf;
void clean() { enable(); }
intf_thread_t *p_intf;
- void delCallbacks( aout_instance_t * );
- void addCallbacks( aout_instance_t * );
+ void delCallbacks( vlc_object_t * );
+ void addCallbacks( vlc_object_t * );
void updateSliders(float *);
void setValues();
QCheckBox *enableCheck;
- void delCallbacks( aout_instance_t * );
- void addCallbacks( aout_instance_t * );
+ void delCallbacks( vlc_object_t * );
+ void addCallbacks( vlc_object_t * );
intf_thread_t *p_intf;
void setValues();
#include <vlc_config_cat.h>
#include <vlc_configuration.h>
+#include <vlc_aout_intf.h>
#include <QString>
#include <QFont>
#include "dialogs/help.hpp" /* Launch Update */
#include "recents.hpp" /* Recents Item destruction */
#include "util/qvlcapp.hpp" /* QVLCApplication definition */
+#include <vlc_aout_intf.h>
#ifdef Q_WS_X11
#include <vlc_xlib.h>
#include "util/input_slider.hpp"
#include "adapters/seekpoints.hpp"
+#include <vlc_aout_intf.h>
#include <stdlib.h>
#endif
#include <vlc_common.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_playlist.h>
#include "volume.hpp"
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_meta.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <lua.h> /* Low level lua C API */
#include <lauxlib.h> /* Higher level C API */
#endif
#include <vlc_common.h>
+#include <vlc_aout_intf.h>
#include <stdio.h>
#include <stdlib.h> /* calloc(), malloc(), free() */
#include <vlc_common.h>
#include <vlc_input.h>
+#include <vlc_aout_intf.h>
#include <vlc_aout.h>
#include <vlc_modules.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_cpu.h>
+#include <vlc_aout_intf.h>
#include "libvlc.h"
//#define Nothing here, this is just to prevent update-po from being stupid
#include <vlc_input.h>
#include <vlc_meta.h>
#include <vlc_playlist.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_strings.h>
#include <vlc_url.h>