mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
properly deal with time pausing
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1977 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a46804a8e2
commit
6e1f7bd144
1 changed files with 8 additions and 4 deletions
|
|
@ -310,7 +310,8 @@ void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y) {
|
|||
/* Fix up x value */
|
||||
if (s->paused)
|
||||
x = s->pause_time;
|
||||
else
|
||||
|
||||
pa_assert(x >= s->time_offset);
|
||||
x -= s->time_offset;
|
||||
|
||||
pa_assert(x >= s->ex);
|
||||
|
|
@ -342,7 +343,8 @@ pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x) {
|
|||
/* Fix up x value */
|
||||
if (s->paused)
|
||||
x = s->pause_time;
|
||||
else
|
||||
|
||||
pa_assert(x >= s->time_offset);
|
||||
x -= s->time_offset;
|
||||
|
||||
pa_assert(x >= s->ex);
|
||||
|
|
@ -373,6 +375,8 @@ void pa_smoother_resume(pa_smoother *s, pa_usec_t x) {
|
|||
if (!s->paused)
|
||||
return;
|
||||
|
||||
pa_assert(x >= s->pause_time);
|
||||
|
||||
s->paused = FALSE;
|
||||
s->time_offset += x - s->pause_time;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue