mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 15:10:27 +02:00
moved pushAudioOutput to handleAudioInput
This commit is contained in:
parent
656131b7ee
commit
30c17067a1
2 changed files with 7 additions and 4 deletions
|
@ -711,6 +711,8 @@ void Audio::handleAudioInput() {
|
|||
}
|
||||
delete[] inputAudioSamples;
|
||||
}
|
||||
|
||||
pushAudioToOutput();
|
||||
}
|
||||
|
||||
void Audio::addReceivedAudioToStream(const QByteArray& audioByteArray) {
|
||||
|
@ -894,7 +896,7 @@ void Audio::processReceivedAudio(const QByteArray& audioByteArray) {
|
|||
// parse audio data
|
||||
_receivedAudioStream.parseData(audioByteArray);
|
||||
|
||||
pushAudioToOutput();
|
||||
//pushAudioToOutput();
|
||||
}
|
||||
|
||||
void Audio::pushAudioToOutput() {
|
||||
|
@ -1660,7 +1662,7 @@ bool Audio::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDeviceInfo)
|
|||
|
||||
// setup our general output device for audio-mixer audio
|
||||
_audioOutput = new QAudioOutput(outputDeviceInfo, _outputFormat, this);
|
||||
_audioOutput->setBufferSize(_receivedAudioStream.getFrameCapacity() * _outputFormat.bytesForDuration(BUFFER_SEND_INTERVAL_USECS));
|
||||
_audioOutput->setBufferSize(/*_receivedAudioStream.getFrameCapacity()*/ 10 * _outputFormat.bytesForDuration(BUFFER_SEND_INTERVAL_USECS));
|
||||
qDebug() << "Ring Buffer capacity in frames: " << _receivedAudioStream.getFrameCapacity();
|
||||
_outputDevice = _audioOutput->start();
|
||||
|
||||
|
|
|
@ -166,8 +166,9 @@ void InboundAudioStream::framesAvailableChanged() {
|
|||
}
|
||||
|
||||
void InboundAudioStream::setToStarved() {
|
||||
if (!_isStarved && _ringBuffer.framesAvailable() < _desiredJitterBufferFrames) {
|
||||
starved();
|
||||
starved();
|
||||
if (_ringBuffer.framesAvailable() >= _desiredJitterBufferFrames) {
|
||||
_isStarved = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue