mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Add support for monotonic timestamps
This commit is contained in:
parent
a73ad3f265
commit
309a274454
28 changed files with 77 additions and 25 deletions
|
|
@ -447,7 +447,7 @@ static int snd_pcm_ioplug_start(snd_pcm_t *pcm)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
gettimestamp(&io->trigger_tstamp);
|
||||
gettimestamp(&io->trigger_tstamp, pcm->monotonic);
|
||||
io->data->state = SND_PCM_STATE_RUNNING;
|
||||
|
||||
return 0;
|
||||
|
|
@ -462,7 +462,7 @@ static int snd_pcm_ioplug_drop(snd_pcm_t *pcm)
|
|||
|
||||
io->data->callback->stop(io->data);
|
||||
|
||||
gettimestamp(&io->trigger_tstamp);
|
||||
gettimestamp(&io->trigger_tstamp, pcm->monotonic);
|
||||
io->data->state = SND_PCM_STATE_SETUP;
|
||||
|
||||
return 0;
|
||||
|
|
@ -1021,6 +1021,7 @@ int snd_pcm_ioplug_reinit_status(snd_pcm_ioplug_t *ioplug)
|
|||
{
|
||||
ioplug->pcm->poll_fd = ioplug->poll_fd;
|
||||
ioplug->pcm->poll_events = ioplug->poll_events;
|
||||
ioplug->pcm->monotonic = (ioplug->flags & SND_PCM_IOPLUG_FLAG_MONOTONIC) != 0;
|
||||
ioplug->pcm->mmap_rw = ioplug->mmap_rw;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue