ALSA project - the C library reference
Data Fields
snd_pcm_ioplug_callback_t Struct Reference

#include <pcm_ioplug.h>

Collaboration diagram for snd_pcm_ioplug_callback_t:
Collaboration graph
[legend]

Data Fields

int(* start )(snd_pcm_ioplug_t *io)
 
int(* stop )(snd_pcm_ioplug_t *io)
 
snd_pcm_sframes_t(* pointer )(snd_pcm_ioplug_t *io)
 
snd_pcm_sframes_t(* transfer )(snd_pcm_ioplug_t *io, const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset, snd_pcm_uframes_t size)
 
int(* close )(snd_pcm_ioplug_t *io)
 
int(* hw_params )(snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params)
 
int(* hw_free )(snd_pcm_ioplug_t *io)
 
int(* sw_params )(snd_pcm_ioplug_t *io, snd_pcm_sw_params_t *params)
 
int(* prepare )(snd_pcm_ioplug_t *io)
 
int(* drain )(snd_pcm_ioplug_t *io)
 
int(* pause )(snd_pcm_ioplug_t *io, int enable)
 
int(* resume )(snd_pcm_ioplug_t *io)
 
int(* poll_descriptors_count )(snd_pcm_ioplug_t *io)
 
int(* poll_descriptors )(snd_pcm_ioplug_t *io, struct pollfd *pfd, unsigned int space)
 
int(* poll_revents )(snd_pcm_ioplug_t *io, struct pollfd *pfd, unsigned int nfds, unsigned short *revents)
 
void(* dump )(snd_pcm_ioplug_t *io, snd_output_t *out)
 
int(* delay )(snd_pcm_ioplug_t *io, snd_pcm_sframes_t *delayp)
 
snd_pcm_chmap_query_t **(* query_chmaps )(snd_pcm_ioplug_t *io)
 
snd_pcm_chmap_t *(* get_chmap )(snd_pcm_ioplug_t *io)
 
int(* set_chmap )(snd_pcm_ioplug_t *io, const snd_pcm_chmap_t *map)
 

Detailed Description

Callback table of ioplug

Field Documentation

◆ close

int(* snd_pcm_ioplug_callback_t::close) (snd_pcm_ioplug_t *io)

close the PCM; optional

◆ delay

int(* snd_pcm_ioplug_callback_t::delay) (snd_pcm_ioplug_t *io, snd_pcm_sframes_t *delayp)

get the delay for the running PCM; optional; since v1.0.1

◆ drain

int(* snd_pcm_ioplug_callback_t::drain) (snd_pcm_ioplug_t *io)

drain; optional

◆ dump

void(* snd_pcm_ioplug_callback_t::dump) (snd_pcm_ioplug_t *io, snd_output_t *out)

dump; optional

◆ get_chmap

snd_pcm_chmap_t *(* snd_pcm_ioplug_callback_t::get_chmap) (snd_pcm_ioplug_t *io)

get the channel map; optional; since v1.0.2

◆ hw_free

int(* snd_pcm_ioplug_callback_t::hw_free) (snd_pcm_ioplug_t *io)

hw_free; optional

◆ hw_params

int(* snd_pcm_ioplug_callback_t::hw_params) (snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params)

hw_params; optional

◆ pause

int(* snd_pcm_ioplug_callback_t::pause) (snd_pcm_ioplug_t *io, int enable)

toggle pause; optional, called inside mutex lock

◆ pointer

snd_pcm_sframes_t(* snd_pcm_ioplug_callback_t::pointer) (snd_pcm_ioplug_t *io)

get the current DMA position; required, called inside mutex lock

Returns
buffer position up to buffer_size or when SND_PCM_IOPLUG_FLAG_BOUNDARY_WA flag is set up to boundary or a negative error code for Xrun

◆ poll_descriptors

int(* snd_pcm_ioplug_callback_t::poll_descriptors) (snd_pcm_ioplug_t *io, struct pollfd *pfd, unsigned int space)

poll descriptors; optional

◆ poll_descriptors_count

int(* snd_pcm_ioplug_callback_t::poll_descriptors_count) (snd_pcm_ioplug_t *io)

poll descriptors count; optional

◆ poll_revents

int(* snd_pcm_ioplug_callback_t::poll_revents) (snd_pcm_ioplug_t *io, struct pollfd *pfd, unsigned int nfds, unsigned short *revents)

mangle poll events; optional

◆ prepare

int(* snd_pcm_ioplug_callback_t::prepare) (snd_pcm_ioplug_t *io)

prepare; optional

◆ query_chmaps

snd_pcm_chmap_query_t **(* snd_pcm_ioplug_callback_t::query_chmaps) (snd_pcm_ioplug_t *io)

query the channel maps; optional; since v1.0.2

◆ resume

int(* snd_pcm_ioplug_callback_t::resume) (snd_pcm_ioplug_t *io)

resume; optional

◆ set_chmap

int(* snd_pcm_ioplug_callback_t::set_chmap) (snd_pcm_ioplug_t *io, const snd_pcm_chmap_t *map)

set the channel map; optional; since v1.0.2

◆ start

int(* snd_pcm_ioplug_callback_t::start) (snd_pcm_ioplug_t *io)

start the PCM; required, called inside mutex lock

◆ stop

int(* snd_pcm_ioplug_callback_t::stop) (snd_pcm_ioplug_t *io)

stop the PCM; required, called inside mutex lock

◆ sw_params

int(* snd_pcm_ioplug_callback_t::sw_params) (snd_pcm_ioplug_t *io, snd_pcm_sw_params_t *params)

sw_params; optional

◆ transfer

snd_pcm_sframes_t(* snd_pcm_ioplug_callback_t::transfer) (snd_pcm_ioplug_t *io, const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset, snd_pcm_uframes_t size)

transfer the data; optional, called inside mutex lock


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