Commit 952e8007 authored by Rémi Denis-Courmont's avatar 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).
parent 6a40ca71
...@@ -219,7 +219,6 @@ VLC_API void aout_FormatPrint(vlc_object_t *, const char *, ...@@ -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) #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 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_VolumeSoftInit( audio_output_t * );
VLC_API void aout_VolumeHardInit( audio_output_t *, aout_volume_cb, bool ); VLC_API void aout_VolumeHardInit( audio_output_t *, aout_volume_cb, bool );
VLC_API void aout_VolumeHardSet( audio_output_t *, float, bool ); VLC_API void aout_VolumeHardSet( audio_output_t *, float, bool );
......
...@@ -526,7 +526,7 @@ static int Open (vlc_object_t *obj) ...@@ -526,7 +526,7 @@ static int Open (vlc_object_t *obj)
{ {
aout->format.i_bytes_per_frame = AOUT_SPDIF_SIZE; aout->format.i_bytes_per_frame = AOUT_SPDIF_SIZE;
aout->format.i_frame_length = A52_FRAME_NB; aout->format.i_frame_length = A52_FRAME_NB;
aout_VolumeNoneInit (aout); aout->pf_volume_set = NULL;
} }
else else
{ {
......
...@@ -787,7 +787,7 @@ static int OpenSPDIF( audio_output_t * p_aout ) ...@@ -787,7 +787,7 @@ static int OpenSPDIF( audio_output_t * p_aout )
p_aout->format.i_rate = (unsigned int)p_sys->stream_format.mSampleRate; p_aout->format.i_rate = (unsigned int)p_sys->stream_format.mSampleRate;
aout_FormatPrepare( &p_aout->format ); aout_FormatPrepare( &p_aout->format );
aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB ); aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB );
aout_VolumeNoneInit( p_aout ); p_aout->pf_volume_set = NULL;
/* Add IOProc callback */ /* Add IOProc callback */
err = AudioDeviceCreateIOProcID( p_sys->i_selected_dev, err = AudioDeviceCreateIOProcID( p_sys->i_selected_dev,
......
...@@ -233,7 +233,7 @@ static int OpenAudio( vlc_object_t *p_this ) ...@@ -233,7 +233,7 @@ static int OpenAudio( vlc_object_t *p_this )
aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB ); aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB );
p_aout->sys->volume = -1; p_aout->sys->volume = -1;
aout_VolumeNoneInit( p_aout ); p_aout->pf_volume_set = NULL;
} }
else else
{ {
......
...@@ -194,7 +194,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -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_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->format.i_frame_length = A52_FRAME_NB; p_aout->format.i_frame_length = A52_FRAME_NB;
} }
aout_VolumeNoneInit( p_aout ); p_aout->pf_volume_set = NULL;
/* Channels number */ /* Channels number */
i_channels = var_CreateGetInteger( p_this, "audiofile-channels" ); i_channels = var_CreateGetInteger( p_this, "audiofile-channels" );
......
...@@ -370,7 +370,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -370,7 +370,7 @@ static int Open( vlc_object_t *p_this )
p_aout->format.i_frame_length = A52_FRAME_NB; p_aout->format.i_frame_length = A52_FRAME_NB;
aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB ); aout_PacketInit( p_aout, &p_sys->packet, A52_FRAME_NB );
aout_VolumeNoneInit( p_aout ); p_aout->pf_volume_set = NULL;
} }
else else
{ {
......
...@@ -246,7 +246,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -246,7 +246,7 @@ static int Open( vlc_object_t *p_this )
p_aout->format.i_bytes_per_frame; p_aout->format.i_bytes_per_frame;
aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB ); aout_PacketInit( p_aout, &p_aout->sys->packet, A52_FRAME_NB );
aout_VolumeNoneInit( p_aout ); p_aout->pf_volume_set = NULL;
} }
else else
{ {
......
...@@ -66,7 +66,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent ) ...@@ -66,7 +66,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
owner->volume.mixer = NULL; owner->volume.mixer = NULL;
aout->pf_play = aout_DecDeleteBuffer; aout->pf_play = aout_DecDeleteBuffer;
aout_VolumeNoneInit (aout); aout->pf_volume_set = NULL;
vlc_object_set_destructor (aout, aout_Destructor); vlc_object_set_destructor (aout, aout_Destructor);
/* /*
......
...@@ -97,7 +97,7 @@ static int commitVolume (vlc_object_t *obj, audio_output_t *aout, ...@@ -97,7 +97,7 @@ static int commitVolume (vlc_object_t *obj, audio_output_t *aout,
/* apply volume to the pipeline */ /* apply volume to the pipeline */
aout_lock (aout); aout_lock (aout);
if (owner->module != NULL) if (aout->pf_volume_set != NULL)
ret = aout->pf_volume_set (aout, vol, mute); ret = aout->pf_volume_set (aout, vol, mute);
aout_unlock (aout); aout_unlock (aout);
......
...@@ -211,7 +211,7 @@ void aout_OutputDelete (audio_output_t *aout) ...@@ -211,7 +211,7 @@ void aout_OutputDelete (audio_output_t *aout)
aout->pf_play = aout_DecDeleteBuffer; /* gruik */ aout->pf_play = aout_DecDeleteBuffer; /* gruik */
aout->pf_pause = NULL; aout->pf_pause = NULL;
aout->pf_flush = NULL; aout->pf_flush = NULL;
aout_VolumeNoneInit (aout); aout->pf_volume_set = NULL;
owner->module = NULL; owner->module = NULL;
aout_FiltersDestroyPipeline (owner->filters, owner->nb_filters); aout_FiltersDestroyPipeline (owner->filters, owner->nb_filters);
} }
...@@ -266,28 +266,6 @@ void aout_OutputFlush( audio_output_t *aout, bool wait ) ...@@ -266,28 +266,6 @@ void aout_OutputFlush( audio_output_t *aout, bool wait )
/*** Volume handling ***/ /*** 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. * Volume setter for software volume.
*/ */
......
...@@ -21,7 +21,6 @@ aout_ToggleMute ...@@ -21,7 +21,6 @@ aout_ToggleMute
aout_IsMuted aout_IsMuted
aout_SetMute aout_SetMute
aout_TimeReport aout_TimeReport
aout_VolumeNoneInit
aout_VolumeSoftInit aout_VolumeSoftInit
aout_VolumeHardInit aout_VolumeHardInit
aout_VolumeHardSet aout_VolumeHardSet
......
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