gmerlin
Data Fields
bg_oa_plugin_s Struct Reference

Audio output plugin. More...

#include <plugin.h>

Data Fields

bg_plugin_common_t common
 Infos and functions common to all plugin types. More...
 
int(* open )(void *priv, gavl_audio_format_t *format)
 Open plugin. More...
 
int(* start )(void *priv)
 Start playback. More...
 
gavl_audio_sink_t *(* get_sink )(void *priv)
 Get audio sink. More...
 
int(* get_delay )(void *priv)
 Get the number of buffered audio samples. More...
 
void(* stop )(void *priv)
 Stop playback. More...
 
void(* close )(void *priv)
 Close plugin. More...
 

Detailed Description

Audio output plugin.

This plugin type implements audio playback through a soundcard.

Field Documentation

◆ common

bg_plugin_common_t bg_oa_plugin_s::common

Infos and functions common to all plugin types.

◆ open

int(* bg_oa_plugin_s::open) (void *priv, gavl_audio_format_t *format)

Open plugin.

Parameters
privThe handle returned by the create() method
formatThe format of the media source

The format will be changed to the nearest format, which is supported by the plugin. To convert the source format to the output format, use a gavl_audio_converter_t

◆ start

int(* bg_oa_plugin_s::start) (void *priv)

Start playback.

Parameters
privThe handle returned by the create() method

Notify the plugin, that audio playback is about to begin.

◆ get_sink

gavl_audio_sink_t*(* bg_oa_plugin_s::get_sink) (void *priv)

Get audio sink.

Parameters
privThe handle returned by the create() method
Returns
Audio sink

◆ get_delay

int(* bg_oa_plugin_s::get_delay) (void *priv)

Get the number of buffered audio samples.

Parameters
privThe handle returned by the create() method
Returns
The number of buffered samples (both soft- and hardware)

This function is used for A/V synchronization with the soundcard. If this function is NULL, software synchronization will be used

◆ stop

void(* bg_oa_plugin_s::stop) (void *priv)

Stop playback.

Parameters
privThe handle returned by the create() method

Notify the plugin, that playback will stop. Playback can be starzed again with start().

◆ close

void(* bg_oa_plugin_s::close) (void *priv)

Close plugin.

Parameters
privThe handle returned by the create() method

Close the plugin. After this call, the plugin can be opened with another format


The documentation for this struct was generated from the following file: