Permalink
Browse files

QtRadio: reduced audio buffers to 800 to cater to RTP buffer size of …

…only 400 in dspserver
  • Loading branch information...
1 parent 69b2624 commit 2bba774659176efac03fc549301c6463dca44e06 @alexlee188 committed May 21, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −0 alex-openmp-sse3-conf.sh
  2. +2 −2 trunk/src/QtRadio/Audio.cpp
  3. +1 −1 trunk/src/QtRadio/Audio.h
View
@@ -0,0 +1,3 @@
+#!/bin/bash
+./configure CFLAGS='-fopenmp -O3 -msse3' CXXFLAGS='-fopenmp -O3 -msse3'
+
@@ -85,7 +85,7 @@ qint64 Audio_playback::readData(char *data, qint64 maxlen)
{
qint64 bytes_read;
qint16 v;
- qint64 bytes_to_read = maxlen;
+ qint64 bytes_to_read = maxlen > 800 ? 800: maxlen;
int has_more;
if (useRTP && rtp_connected){
@@ -372,7 +372,7 @@ void Audio::stateChanged(QAudio::State State){
case QAudio::SuspendedState:
if (audio_output->error() != QAudio::NoError) {
qDebug() << "QAudioOutput: after start error=" << audio_output->error() << " state=" << State;
- audio_output->start(audio_out);
+ //audio_output->start(audio_out);
break;
}
case QAudio::IdleState:
@@ -45,7 +45,7 @@
#include "G711A.h"
#include "cusdr_queue.h"
-#define AUDIO_BUFFER_SIZE 1600
+#define AUDIO_BUFFER_SIZE 800
#define AUDIO_OUTPUT_BUFFER_SIZE (1024*2)
#define RESAMPLING_BUFFER_SIZE (10600*2) // 2 channels of 9600 + 10%

0 comments on commit 2bba774

Please sign in to comment.