Add support for monotonic timestamps

This commit is contained in:
Jaroslav Kysela 2008-01-09 11:13:34 +01:00
parent a73ad3f265
commit 309a274454
28 changed files with 77 additions and 25 deletions

View file

@ -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;
}