Allow ioplugins to override snd_pcm_delay()

Some io plug-ins might want to adjust the reported delay value and not
strictly follow the current buffer usage (that's why we have two calls
after all).

Allow them to specify a delay() callback and use the previous behaviour
if they don't.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
This commit is contained in:
Pierre Ossman 2006-05-26 17:08:18 +02:00 committed by Takashi Iwai
parent 1d80c5b901
commit 3fd9369990
2 changed files with 17 additions and 4 deletions

View file

@ -65,7 +65,7 @@ typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
*/
#define SND_PCM_IOPLUG_VERSION_MAJOR 1 /**< Protocol major version */
#define SND_PCM_IOPLUG_VERSION_MINOR 0 /**< Protocol minor version */
#define SND_PCM_IOPLUG_VERSION_TINY 0 /**< Protocol tiny version */
#define SND_PCM_IOPLUG_VERSION_TINY 1 /**< Protocol tiny version */
/**
* IO-plugin protocol version
*/
@ -184,6 +184,10 @@ struct snd_pcm_ioplug_callback {
* dump; optional
*/
void (*dump)(snd_pcm_ioplug_t *io, snd_output_t *out);
/**
* get the delay for the running PCM; optional
*/
int (*delay)(snd_pcm_ioplug_t *io, snd_pcm_sframes_t *delayp);
};