mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
Add support for monotonic timestamps
This commit is contained in:
parent
a73ad3f265
commit
309a274454
28 changed files with 77 additions and 25 deletions
|
|
@ -1093,7 +1093,7 @@ static int snd_pcm_rate_start(snd_pcm_t *pcm)
|
|||
if (snd_pcm_state(rate->gen.slave) != SND_PCM_STATE_PREPARED)
|
||||
return -EBADFD;
|
||||
|
||||
gettimestamp(&rate->trigger_tstamp);
|
||||
gettimestamp(&rate->trigger_tstamp, pcm->monotonic);
|
||||
|
||||
avail = snd_pcm_mmap_playback_hw_avail(rate->gen.slave);
|
||||
if (avail == 0) {
|
||||
|
|
@ -1366,6 +1366,7 @@ int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
|
|||
pcm->poll_fd = slave->poll_fd;
|
||||
pcm->poll_events = slave->poll_events;
|
||||
pcm->mmap_rw = 1;
|
||||
pcm->monotonic = slave->monotonic;
|
||||
snd_pcm_set_hw_ptr(pcm, &rate->hw_ptr, -1, 0);
|
||||
snd_pcm_set_appl_ptr(pcm, &rate->appl_ptr, -1, 0);
|
||||
*pcmp = pcm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue