only when succesfully probed and not afterward) */
struct aout_sys_t *sys; /**< Output plugin private data */
- void (*pf_play)(audio_output_t *, block_t *, mtime_t *); /**< Play callback
+ void (*play)(audio_output_t *, block_t *, mtime_t *); /**< Play callback
- queue a block for playback */
- void (* pf_pause)( audio_output_t *, bool, mtime_t ); /**< Pause/resume
+ void (*pause)( audio_output_t *, bool, mtime_t ); /**< Pause/resume
callback (optional, may be NULL) */
- void (* pf_flush)( audio_output_t *, bool ); /**< Flush/drain callback
+ void (*flush)( audio_output_t *, bool ); /**< Flush/drain callback
(optional, may be NULL) */
int (*volume_set)(audio_output_t *, float); /**< Volume setter (or NULL) */
int (*mute_set)(audio_output_t *, bool); /**< Mute setter (or NULL) */
{
audio_output_t * p_aout = (audio_output_t *)p_this;
- p_aout->pf_play = Play;
- p_aout->pf_pause = NULL;
- p_aout->pf_flush = NULL;
+ p_aout->play = Play;
+ p_aout->pause = NULL;
+ p_aout->flush = NULL;
p_aout->volume_set = NULL;
p_aout->mute_set = NULL;
aout_SoftVolumeInit (aout);
}
- aout->pf_play = Play;
+ aout->play = Play;
if (snd_pcm_hw_params_can_pause (hw))
- aout->pf_pause = Pause;
+ aout->pause = Pause;
else
{
- aout->pf_pause = PauseDummy;
+ aout->pause = PauseDummy;
msg_Warn (aout, "device cannot be paused");
}
- aout->pf_flush = Flush;
+ aout->flush = Flush;
/* Setup audio-device choices */
{
aout->format.i_rate = rate;
aout->format.i_original_channels = aout->format.i_physical_channels;
- aout->pf_play = Play;
- aout->pf_pause = Pause;
- aout->pf_flush = Flush;
+ aout->play = Play;
+ aout->pause = Pause;
+ aout->flush = Flush;
if (sys->set_volume != NULL)
{
aout->volume_set = VolumeSet;
p_aout->format.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
p_aout->format.i_rate = 44100;
aout_PacketInit(p_aout, &p_sys->packet, FRAME_SIZE);
- p_aout->pf_play = aout_PacketPlay;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = aout_PacketPlay;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
msg_Dbg(p_aout, "Starting AudioQueue (status = %i)", status);
status = AudioQueueStart(p_sys->audioQueue, NULL);
}
p_aout->sys = p_sys;
- p_aout->pf_play = Play;
- p_aout->pf_pause = Pause;
+ p_aout->play = Play;
+ p_aout->pause = Pause;
p_sys->at_start(p_sys->AudioTrack);
p_sys->b_changed_mixing = false;
memset(p_sys->p_remainder_buffer, 0, sizeof(uint8_t) * BUFSIZE);
- p_aout->pf_play = aout_PacketPlay;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = aout_PacketPlay;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
aout_FormatPrint(p_aout, "VLC is looking for:", &p_aout->format);
/*****************************************************************************
- * VolumeSet: Implements pf_volume_set(). Update the CoreAudio AU volume immediately.
+ * VolumeSet: Implements volume_set(). Update the CoreAudio AU volume immediately.
*****************************************************************************/
static int VolumeSet(audio_output_t * p_aout, float volume)
{
goto error;
}
- p_aout->pf_play = Play;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = Play;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
/* Volume */
if( val.i_int == AOUT_VAR_SPDIF )
SetEvent( p_aout->sys->notif.event );
aout_PacketPlay( p_aout, p_buffer, drift );
- p_aout->pf_play = aout_PacketPlay;
+ p_aout->play = aout_PacketPlay;
}
static int VolumeSet( audio_output_t *p_aout, float vol )
{
vlc_atomic_set(&p_aout->sys->notif.abort, 1);
/* wake up the audio thread if needed */
- if( p_aout->pf_play == Play )
+ if( p_aout->play == Play )
SetEvent( p_sys->notif.event );
vlc_join( p_sys->notif.thread, NULL );
return VLC_EGENERIC;
}
- p_aout->pf_play = Play;
- p_aout->pf_pause = NULL;
- p_aout->pf_flush = NULL;
+ p_aout->play = Play;
+ p_aout->pause = NULL;
+ p_aout->flush = NULL;
/* Audio format */
psz_format = var_CreateGetString( p_this, "audiofile-format" );
// TODO add buffer size callback
p_aout->format.i_rate = jack_get_sample_rate( p_sys->p_jack_client );
- p_aout->pf_play = aout_PacketPlay;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = aout_PacketPlay;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
aout_PacketInit( p_aout, &p_sys->packet,
jack_get_buffer_size( p_sys->p_jack_client ) );
aout_SoftVolumeInit( p_aout );
p_aout->format = format;
- p_aout->pf_play = Play;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = Play;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
aout_PacketInit( p_aout, &p_sys->packet,
ks_obtained.ulBufferSize / i_bytes_per_frame );
// we want 16bit signed data little endian.
p_aout->format.i_format = VLC_CODEC_S16L;
p_aout->format.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
- p_aout->pf_play = Play;
- p_aout->pf_pause = Pause;
- p_aout->pf_flush = Flush;
+ p_aout->play = Play;
+ p_aout->pause = Pause;
+ p_aout->flush = Flush;
aout_FormatPrepare( &p_aout->format );
/* Setup audio_output_t */
aout->format.i_format = fourcc;
- aout->pf_play = Play;
- aout->pf_pause = Pause;
- aout->pf_flush = Flush;
+ aout->play = Play;
+ aout->pause = Pause;
+ aout->flush = Flush;
aout->volume_set = NULL;
aout->mute_set = NULL;
/**
* Dequeues the next audio packet (a.k.a. audio fragment).
* The audio output plugin must first call aout_PacketPlay() to queue the
- * decoded audio samples. Typically, audio_output_t.pf_play is set to, or calls
+ * decoded audio samples. Typically, audio_output_t.play is set to, or calls
* aout_PacketPlay().
* @note This function is considered legacy. Please do not use this function in
* new audio output plugins.
pa_threaded_mainloop_unlock(sys->mainloop);
aout->format.i_format = format;
- aout->pf_play = Play;
- aout->pf_pause = Pause;
- aout->pf_flush = Flush;
+ aout->play = Play;
+ aout->pause = Pause;
+ aout->flush = Flush;
aout->volume_set = VolumeSet;
aout->mute_set = MuteSet;
return VLC_SUCCESS;
aout->format = f;
aout->sys = sys;
- aout->pf_play = Play;
- aout->pf_pause = Pause;
- aout->pf_flush = NULL; /* sndio sucks! */
+ aout->play = Play;
+ aout->pause = Pause;
+ aout->flush = NULL; /* sndio sucks! */
if (sio_onvol(sys->hdl, VolumeChanged, aout))
{
aout->volume_set = VolumeSet;
Leave();
aout->format = format;
- aout->pf_play = Play;
- aout->pf_pause = Pause;
- aout->pf_flush = Flush;
+ aout->play = Play;
+ aout->pause = Pause;
+ aout->flush = Flush;
/*if (AOUT_FMT_LINEAR(&format) && !exclusive)*/
{
aout->volume_set = SimpleVolumeSet;
if( p_aout->sys == NULL )
return VLC_ENOMEM;
- p_aout->pf_play = Play;
- p_aout->pf_pause = aout_PacketPause;
- p_aout->pf_flush = aout_PacketFlush;
+ p_aout->play = Play;
+ p_aout->pause = aout_PacketPause;
+ p_aout->flush = aout_PacketFlush;
/*
check for configured audio device!
*
* @warning The caller (i.e. the audio output plug-in) is responsible for
* interlocking and synchronizing call to this function and to the
- * audio_output_t.pf_volume_set callback. This ensures that VLC gets correct
+ * audio_output_t.volume_set callback. This ensures that VLC gets correct
* volume information (possibly with a latency).
*/
static void aout_OutputVolumeReport (audio_output_t *aout, float volume)
}
if (likely(owner->module != NULL))
- aout->pf_play (aout, block, &drift);
+ aout->play (aout, block, &drift);
else
block_Release (block);
/**
void aout_OutputPause( audio_output_t *aout, bool pause, mtime_t date )
{
aout_assert_locked( aout );
- if( aout->pf_pause != NULL )
- aout->pf_pause( aout, pause, date );
+ if( aout->pause != NULL )
+ aout->pause( aout, pause, date );
}
/**
{
aout_assert_locked( aout );
- if( aout->pf_flush != NULL )
- aout->pf_flush( aout, wait );
+ if( aout->flush != NULL )
+ aout->flush( aout, wait );
}