21 #include <pulse/simple.h>
22 #include <pulse/error.h>
48 pa_buffer_attr attr = { -1, -1, -1, -1, -1 };
61 stream_name =
"Playback";
71 "Buffer duration: %ums recalculated into %"PRId64
" bytes buffer.\n",
104 pa_simple_flush(s->
pa, NULL);
105 pa_simple_free(s->
pa);
116 if (pa_simple_flush(s->
pa, &error) < 0) {
136 if (pa_simple_write(s->
pa, pkt->
data, pkt->
size, &error) < 0) {
147 pa_usec_t latency = pa_simple_get_latency(s->
pa, NULL);
152 #define OFFSET(a) offsetof(PulseData, a)
153 #define E AV_OPT_FLAG_ENCODING_PARAM
160 {
"buffer_size",
"set buffer size in bytes",
OFFSET(buffer_size),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX,
E },
161 {
"buffer_duration",
"set buffer duration in millisecs",
OFFSET(buffer_duration),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX,
E },