diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-30 20:22:01 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-30 20:22:01 +0200 |
commit | 1b87863a75e6992a39f86a2f1c6c080364d37ef6 (patch) | |
tree | 4a597249ccc860190616e796fff844fb6c41ac19 | |
parent | 87c0451055274f51b727595acd087c29b748d1a3 (diff) |
fake snd_pcm_avail_update
-rw-r--r-- | libasound.c | 7 | ||||
-rw-r--r-- | stubs.h | 1 |
2 files changed, 7 insertions, 1 deletions
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) { @@ -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; } |