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 *,
#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 );
......
......@@ -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
{
......
......@@ -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,
......
......@@ -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
{
......
......@@ -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" );
......
......@@ -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
{
......
......@@ -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
{
......
......@@ -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);
/*
......
......@@ -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);
......
......@@ -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);
}
......@@ -266,28 +266,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.
*/
......
......@@ -21,7 +21,6 @@ aout_ToggleMute
aout_IsMuted
aout_SetMute
aout_TimeReport
aout_VolumeNoneInit
aout_VolumeSoftInit
aout_VolumeHardInit
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