Skip to content
Snippets Groups Projects
Commit 04a7e485 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Merge branch 'master' of...

parents 7690faa1 00b0ae0b
No related branches found
No related tags found
No related merge requests found
...@@ -184,28 +184,37 @@ AudioStream::createStream (pa_context* c) ...@@ -184,28 +184,37 @@ AudioStream::createStream (pa_context* c)
// parameters are defined as number of bytes // parameters are defined as number of bytes
// 2048 bytes (1024 int16) is 20 ms at 44100 Hz // 2048 bytes (1024 int16) is 20 ms at 44100 Hz
if (_streamType == PLAYBACK_STREAM) { if (_streamType == PLAYBACK_STREAM) {
/*
attributes->maxlength = (uint32_t) -1;
attributes->tlength = 1024;
attributes->prebuf = (uint32_t) -1;
attributes->minreq = (uint32_t) -1;
attributes->fragsize = (uint32_t) -1;
*/
attributes->maxlength = 88200; attributes->maxlength = 88200;
attributes->tlength = 22050; attributes->tlength = 44100;
attributes->prebuf = 0; // Pulseaudio will not start if prebuffering is not reached attributes->prebuf = 4096;
attributes->minreq = 0; // The server side playback framesize attributes->minreq = 2048;
attributes->fragsize = 11025; // Fragment size at wich we receive an interupt attributes->fragsize = 4096;
// pa_stream_connect_playback( s , NULL , attributes, PA_STREAM_NOFLAGS, &_volume, NULL); // pa_stream_connect_playback( s , NULL , attributes, PA_STREAM_NOFLAGS, &_volume, NULL);
// pa_stream_connect_playback (s , NULL , attributes, PA_STREAM_START_CORKED, &_volume, NULL); // pa_stream_connect_playback (s , NULL , attributes, PA_STREAM_START_CORKED, &_volume, NULL);
pa_stream_connect_playback( s , NULL , attributes, PA_STREAM_INTERPOLATE_TIMING, &_volume, NULL); pa_stream_connect_playback( s , NULL , attributes, PA_STREAM_ADJUST_LATENCY, &_volume, NULL);
} else if (_streamType == CAPTURE_STREAM) { } else if (_streamType == CAPTURE_STREAM) {
// attributes->maxlength = 66500; // attributes->maxlength = 66500;
// attributes->fragsize = (uint32_t)-1; // attributes->fragsize = (uint32_t)-1;
attributes->maxlength = 88200; attributes->maxlength = (uint32_t) -1;
attributes->tlength = 22050; attributes->tlength = (uint32_t) -1;
attributes->prebuf = 0; attributes->prebuf = (uint32_t) -1;
attributes->minreq = 0; attributes->minreq = (uint32_t) -1;
attributes->fragsize = 11025; attributes->fragsize = 1024;
// pa_stream_connect_record (s , NULL , attributes , PA_STREAM_START_CORKED); // pa_stream_connect_record (s , NULL , attributes , PA_STREAM_START_CORKED);
// pa_stream_connect_record( s , NULL , attributes , PA_STREAM_INTERPOLATE_TIMING ); // pa_stream_connect_record( s , NULL , attributes , PA_STREAM_INTERPOLATE_TIMING );
pa_stream_connect_record( s, NULL, attributes, PA_STREAM_INTERPOLATE_TIMING); pa_stream_connect_record( s, NULL, attributes, PA_STREAM_ADJUST_LATENCY);
} else if (_streamType == UPLOAD_STREAM) { } else if (_streamType == UPLOAD_STREAM) {
pa_stream_connect_upload (s , 1024); pa_stream_connect_upload (s , 1024);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment