Delegate MediaPlayer.LibVLCAudioPlayCb
- Namespace
- LibVLCSharp.Shared
- Assembly
- LibVLCSharp.dll
Callback prototype for audio playback.
public delegate void MediaPlayer.LibVLCAudioPlayCb(nint data, nint samples, uint count, long pts)
Parameters
datanintdata pointer as passed to libvlc_audio_set_callbacks() [IN]
samplesnintpointer to a table of audio samples to play back [IN]
countuintnumber of audio samples to play back
ptslongexpected play time stamp (see libvlc_delay())
Remarks
The LibVLC media player decodes and post-processes the audio signal
asynchronously (in an internal thread). Whenever audio samples are ready
to be queued to the output, this callback is invoked.
The number of samples provided per invocation may depend on the file format,
the audio coding algorithm, the decoder plug-in, the post-processing
filters and timing. Application must not assume a certain number of samples.
The exact format of audio samples is determined by libvlc_audio_set_format()
or libvlc_audio_set_format_callbacks() as is the channels layout.
Note that the number of samples is per channel. For instance, if the audio
track sampling rate is 48000 Hz, then 1200 samples represent 25 milliseconds
of audio signal - regardless of the number of audio channels.
Constructors
LibVLCAudioPlayCb(object, nint)
public LibVLCAudioPlayCb(object @object, nint method)
Parameters
Methods
BeginInvoke(nint, nint, uint, long, AsyncCallback, object)
public virtual IAsyncResult BeginInvoke(nint data, nint samples, uint count, long pts, AsyncCallback callback, object @object)
Parameters
Returns
EndInvoke(IAsyncResult)
public virtual void EndInvoke(IAsyncResult result)
Parameters
resultIAsyncResult
Invoke(nint, nint, uint, long)
public virtual void Invoke(nint data, nint samples, uint count, long pts)