2.5.9 IDeckLinkAudioOutputCallback Interface

The IDeckLinkAudioOutputCallback interface is a callback class called regularly during playback to allow the application to check for the amount of audio currently buffered and buffer more audio if required.

Related Interfaces

Interface

Interface ID

Description

IDeckLinkOutput

IID_IDeckLinkOutput

An IDeckLinkAudioOutputCallback object interface is registered with IDeckLinkOutput::SetAudioCallback()

2.5.9.1 IDeckLinkAudioOutputCallback::RenderAudioSamples method

HRESULT IDeckLinkAudioOutputCallback::RenderAudioSamples(Boolean preroll);

The RenderAudioSamples method is called at a rate of 50Hz during playback. This method is abstract in the base interface and must be implemented by the application developer. The result parameter (required by COM) is ignored by the caller.

Audio preroll is enabled with a call to IDeckLinkOutput::BeginAudioPreroll(). During preroll (preroll is TRUE) call IDeckLinkOutput::ScheduleAudioSamples() to schedule sufficient audio samples for the number of video frames that have scheduled.

During playback (preroll is FALSE) check the count of buffered audio samples with IDeckLinkOutput::GetBufferedAudioSampleFrameCount() and when required, schedule more audio samples with IDeckLinkOutput::ScheduleAudioSamples().

Parameters:

preroll – Flag specifying whether driver is currently pre-rolling (TRUE) or playing (FALSE).