From 1b87863a75e6992a39f86a2f1c6c080364d37ef6 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 30 Oct 2018 20:22:01 +0200 Subject: fake snd_pcm_avail_update --- libasound.c | 7 +++++++ stubs.h | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libasound.c b/libasound.c index c066bf3..d1700a0 100644 --- a/libasound.c +++ b/libasound.c @@ -202,6 +202,13 @@ snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size) return snd_pcm_bytes_to_frames(pcm, sio_read(pcm->hdl, buffer, snd_pcm_frames_to_bytes(pcm, size))); } +snd_pcm_sframes_t +snd_pcm_avail_update(snd_pcm_t *pcm) +{ + // FIXME: not correct, but fine since we force blocking for now + return snd_pcm_bytes_to_frames(pcm, pcm->hw.par.appbufsz); +} + int snd_pcm_prepare(snd_pcm_t *pcm) { diff --git a/stubs.h b/stubs.h index 02cad0a..5603e3a 100644 --- a/stubs.h +++ b/stubs.h @@ -489,7 +489,6 @@ int snd_pcm_hwsync(snd_pcm_t *pcm) { WARNX1("stub"); return 0; } int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) { WARNX1("stub"); return 0; } int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, snd_htimestamp_t *tstamp) { WARNX1("stub"); return 0; } snd_pcm_sframes_t snd_pcm_avail(snd_pcm_t *pcm) { WARNX1("stub"); return 0; } -snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm) { WARNX1("stub"); return 0; } int snd_pcm_avail_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *availp, snd_pcm_sframes_t *delayp) { WARNX1("stub"); return 0; } snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm) { WARNX1("stub"); return 0; } snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames) { WARNX1("stub"); return 0; } -- cgit v1.2.3