Commit 99743b43 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3471] Fix delay in Pulseaudio

parent 4a664536
......@@ -214,7 +214,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
if (_streamType == PLAYBACK_STREAM) {
attributes->maxlength = (uint32_t) -1;
attributes->tlength = pa_usec_to_bytes (200 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->tlength = pa_usec_to_bytes (50 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->prebuf = 0;
attributes->minreq = (uint32_t) -1;
......@@ -231,9 +231,9 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
} else if (_streamType == CAPTURE_STREAM) {
attributes->maxlength = (uint32_t) -1;
attributes->tlength = pa_usec_to_bytes (200 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->tlength = pa_usec_to_bytes (50 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->prebuf = 0;
attributes->fragsize = pa_usec_to_bytes (200 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->fragsize = pa_usec_to_bytes (50 * PA_USEC_PER_MSEC, &_sample_spec);
pa_threaded_mainloop_lock(_mainloop);
......@@ -248,7 +248,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
} else if (_streamType == RINGTONE_STREAM) {
attributes->maxlength = (uint32_t) -1;
attributes->tlength = pa_usec_to_bytes(100 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->tlength = pa_usec_to_bytes(50 * PA_USEC_PER_MSEC, &_sample_spec);
attributes->prebuf = 0;
attributes->minreq = (uint32_t) -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment