[vlc-commits] Remove aout_VolumeNoneInit()
Rémi Denis-Courmont
git at videolan.org
Tue May 22 19:17:25 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 22 20:14:12 2012 +0300| [952e8007b622a7768946dfc5f3ac3d82bdb08061] | committer: Rémi Denis-Courmont
Remove aout_VolumeNoneInit()
This was really just a glorified manner to set a pointer to NULL
(actually to a dummy function but whatever).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=952e8007b622a7768946dfc5f3ac3d82bdb08061
---
include/vlc_aout.h | 1 -
modules/audio_output/alsa.c | 2 +-
modules/audio_output/auhal.c | 2 +-
modules/audio_output/directx.c | 2 +-
modules/audio_output/file.c | 2 +-
modules/audio_output/oss.c | 2 +-
modules/audio_output/waveout.c | 2 +-
src/audio_output/common.c | 2 +-
src/audio_output/intf.c | 2 +-
src/audio_output/output.c | 24 +-----------------------
src/libvlccore.sym | 1 -
11 files changed, 9 insertions(+), 33 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index e2ef668..870d77f 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -219,7 +219,6 @@ VLC_API void aout_FormatPrint(vlc_object_t *, const char *,
#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
-VLC_API void aout_VolumeNoneInit( audio_output_t * );
VLC_API void aout_VolumeSoftInit( audio_output_t * );
VLC_API void aout_VolumeHardInit( audio_output_t *, aout_volume_cb, bool );
VLC_API void aout_VolumeHardSet( audio_output_t *, float, bool );
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 018e7f5..1864878 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -526,7 +526,7 @@ static int Open (vlc_object_t *obj)
{
aout->format.i_bytes_per_frame = AOUT_SPDIF_SIZE;
aout->format.i_frame_length = A52_FRAME_NB;
- aout_VolumeNoneInit (aout);
+ aout->pf_volume_set = NULL;
}
else
{
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 292995d..09e9293 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -787,7 +787,7 @@ static int OpenSPDIF( audio_output_t * p_aout )
p_aout->format.i_rate = (unsigned int)p_sys->stream_format.mSampleRate;
aout_FormatPrepare( &p_aout->format );
aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB );
- aout_VolumeNoneInit( p_aout );
+ p_aout->pf_volume_set = NULL;
/* Add IOProc callback */
err = AudioDeviceCreateIOProcID( p_sys->i_selected_dev,
diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 7b36f97..fa0b4d2 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -233,7 +233,7 @@ static int OpenAudio( vlc_object_t *p_this )
aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB );
p_aout->sys->volume = -1;
- aout_VolumeNoneInit( p_aout );
+ p_aout->pf_volume_set = NULL;
}
else
{
diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c
index e2c4e31..0b731a2 100644
--- a/modules/audio_output/file.c
+++ b/modules/audio_output/file.c
@@ -194,7 +194,7 @@ static int Open( vlc_object_t * p_this )
p_aout->format.i_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->format.i_frame_length = A52_FRAME_NB;
}
- aout_VolumeNoneInit( p_aout );
+ p_aout->pf_volume_set = NULL;
/* Channels number */
i_channels = var_CreateGetInteger( p_this, "audiofile-channels" );
diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index b605d26..b4ec373 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -370,7 +370,7 @@ static int Open( vlc_object_t *p_this )
p_aout->format.i_frame_length = A52_FRAME_NB;
aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB );
- aout_VolumeNoneInit( p_aout );
+ p_aout->pf_volume_set = NULL;
}
else
{
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index ef12c49..e2f18af 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -246,7 +246,7 @@ static int Open( vlc_object_t *p_this )
p_aout->format.i_bytes_per_frame;
aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB );
- aout_VolumeNoneInit( p_aout );
+ p_aout->pf_volume_set = NULL;
}
else
{
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index d0baa2a..17504a9 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -66,7 +66,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
owner->volume.mixer = NULL;
aout->pf_play = aout_DecDeleteBuffer;
- aout_VolumeNoneInit (aout);
+ aout->pf_volume_set = NULL;
vlc_object_set_destructor (aout, aout_Destructor);
/*
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 3a89d2b..1794134 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -97,7 +97,7 @@ static int commitVolume (vlc_object_t *obj, audio_output_t *aout,
/* apply volume to the pipeline */
aout_lock (aout);
- if (owner->module != NULL)
+ if (aout->pf_volume_set != NULL)
ret = aout->pf_volume_set (aout, vol, mute);
aout_unlock (aout);
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index ef8a80c..712a0aa 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -211,7 +211,7 @@ void aout_OutputDelete (audio_output_t *aout)
aout->pf_play = aout_DecDeleteBuffer; /* gruik */
aout->pf_pause = NULL;
aout->pf_flush = NULL;
- aout_VolumeNoneInit (aout);
+ aout->pf_volume_set = NULL;
owner->module = NULL;
aout_FiltersDestroyPipeline (owner->filters, owner->nb_filters);
}
@@ -267,28 +267,6 @@ void aout_OutputFlush( audio_output_t *aout, bool wait )
/*** Volume handling ***/
/**
- * Dummy volume setter. This is the default volume setter.
- */
-static int aout_VolumeNoneSet (audio_output_t *aout, float volume, bool mute)
-{
- (void)aout; (void)volume; (void)mute;
- return -1;
-}
-
-/**
- * Configures the dummy volume setter.
- * @note Audio output plugins for which volume is irrelevant
- * should call this function during activation.
- */
-void aout_VolumeNoneInit (audio_output_t *aout)
-{
- /* aout_New() -safely- calls this function without the lock, before any
- * other thread knows of this audio output instance.
- aout_assert_locked (aout); */
- aout->pf_volume_set = aout_VolumeNoneSet;
-}
-
-/**
* Volume setter for software volume.
*/
static int aout_VolumeSoftSet (audio_output_t *aout, float volume, bool mute)
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 5b130d0..3645925 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -21,7 +21,6 @@ aout_ToggleMute
aout_IsMuted
aout_SetMute
aout_TimeReport
-aout_VolumeNoneInit
aout_VolumeSoftInit
aout_VolumeHardInit
aout_VolumeHardSet
More information about the vlc-commits
mailing list