mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-17 08:56:42 -05:00
support for latency interpolation
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@256 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
da45617efc
commit
148202d432
13 changed files with 250 additions and 72 deletions
|
|
@ -875,11 +875,13 @@ static void command_get_playback_latency(struct pa_pdispatch *pd, uint32_t comma
|
|||
struct pa_tagstruct *reply;
|
||||
struct playback_stream *s;
|
||||
struct timeval tv, now;
|
||||
uint64_t counter;
|
||||
uint32_t index;
|
||||
assert(c && t);
|
||||
|
||||
if (pa_tagstruct_getu32(t, &index) < 0 ||
|
||||
pa_tagstruct_get_timeval(t, &tv) < 0 ||
|
||||
pa_tagstruct_getu64(t, &counter) < 0 ||
|
||||
!pa_tagstruct_eof(t)) {
|
||||
protocol_error(c);
|
||||
return;
|
||||
|
|
@ -907,6 +909,7 @@ static void command_get_playback_latency(struct pa_pdispatch *pd, uint32_t comma
|
|||
pa_tagstruct_put_timeval(reply, &tv);
|
||||
gettimeofday(&now, NULL);
|
||||
pa_tagstruct_put_timeval(reply, &now);
|
||||
pa_tagstruct_putu64(reply, counter);
|
||||
pa_pstream_send_tagstruct(c->pstream, reply);
|
||||
}
|
||||
|
||||
|
|
@ -915,11 +918,13 @@ static void command_get_record_latency(struct pa_pdispatch *pd, uint32_t command
|
|||
struct pa_tagstruct *reply;
|
||||
struct record_stream *s;
|
||||
struct timeval tv, now;
|
||||
uint64_t counter;
|
||||
uint32_t index;
|
||||
assert(c && t);
|
||||
|
||||
if (pa_tagstruct_getu32(t, &index) < 0 ||
|
||||
pa_tagstruct_get_timeval(t, &tv) < 0 ||
|
||||
pa_tagstruct_getu64(t, &counter) < 0 ||
|
||||
!pa_tagstruct_eof(t)) {
|
||||
protocol_error(c);
|
||||
return;
|
||||
|
|
@ -947,6 +952,7 @@ static void command_get_record_latency(struct pa_pdispatch *pd, uint32_t command
|
|||
pa_tagstruct_put_timeval(reply, &tv);
|
||||
gettimeofday(&now, NULL);
|
||||
pa_tagstruct_put_timeval(reply, &now);
|
||||
pa_tagstruct_putu64(reply, counter);
|
||||
pa_pstream_send_tagstruct(c->pstream, reply);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue