This file is part of polypaudio.
polypaudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
+ it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with polypaudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
if (!l)
p->dead = 1;
- else
- p->latency = l->buffer_usec + l->sink_usec + l->transport_usec;
+ else {
+ int negative = 0;
+ p->latency = pa_stream_get_latency(s, l, &negative);
+ if (negative)
+ p->latency = 0;
+ }
}
pa_usec_t pa_simple_get_playback_latency(struct pa_simple *p, int *perror) {
}
p->latency = 0;
- o = pa_stream_get_latency(p->stream, latency_complete, p);
+ o = pa_stream_get_latency_info(p->stream, latency_complete, p);
while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {