mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
* add new API function pa_stream_get_buffer_attr().
* modify pacat.c to make use of that new API * extend protocol to allow transfer of the necessary information * update protocol version accordingly git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@976 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b754d5095e
commit
7d975345a5
8 changed files with 109 additions and 5 deletions
|
|
@ -154,8 +154,26 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
|
|||
break;
|
||||
|
||||
case PA_STREAM_READY:
|
||||
if (verbose)
|
||||
if (verbose) {
|
||||
pa_buffer_attr *a;
|
||||
|
||||
fprintf(stderr, "Stream successfully created.\n");
|
||||
|
||||
if (!(a = pa_stream_get_buffer_attr(s)))
|
||||
fprintf(stderr, "pa_stream_get_buffer_attr() failed: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
|
||||
else {
|
||||
|
||||
if (mode == PLAYBACK)
|
||||
fprintf(stderr, "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n", a->maxlength, a->tlength, a->prebuf, a->minreq);
|
||||
else {
|
||||
assert(mode == RECORD);
|
||||
fprintf(stderr, "Buffer metrics: maxlength=%u, fragsize=%u\n", a->maxlength, a->fragsize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PA_STREAM_FAILED:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue