pcm: hw: fix default timestamp type for O_APPPEND

Fixes: 7e01443e ("pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode")
Link: https://github.com/alsa-project/alsa-lib/pull/450
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2025-04-07 18:52:17 +02:00
parent 7e01443ecc
commit 15f2b27612

View file

@ -1689,6 +1689,12 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
} }
} }
} }
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
else {
/* the first stream already sets this */
tstamp_type = SND_PCM_TSTAMP_TYPE_MONOTONIC;
}
#endif
hw = calloc(1, sizeof(snd_pcm_hw_t)); hw = calloc(1, sizeof(snd_pcm_hw_t));
if (!hw) { if (!hw) {