mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
increase size of audio output buffer to match size of ring buffer
This commit is contained in:
parent
98d9e443eb
commit
cb45a3242d
1 changed files with 1 additions and 1 deletions
|
@ -280,6 +280,7 @@ void Audio::start() {
|
||||||
|
|
||||||
// setup our general output device for audio-mixer audio
|
// setup our general output device for audio-mixer audio
|
||||||
_audioOutput = new QAudioOutput(outputDeviceInfo, _outputFormat, this);
|
_audioOutput = new QAudioOutput(outputDeviceInfo, _outputFormat, this);
|
||||||
|
_audioOutput->setBufferSize(_ringBuffer.getSampleCapacity() * sizeof(int16_t));
|
||||||
_outputDevice = _audioOutput->start();
|
_outputDevice = _audioOutput->start();
|
||||||
|
|
||||||
// setup a loopback audio output device
|
// setup a loopback audio output device
|
||||||
|
@ -556,7 +557,6 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
|
||||||
// if there is anything in the ring buffer, decide what to do
|
// if there is anything in the ring buffer, decide what to do
|
||||||
if (_ringBuffer.samplesAvailable() > 0) {
|
if (_ringBuffer.samplesAvailable() > 0) {
|
||||||
|
|
||||||
|
|
||||||
int numNetworkOutputSamples = _ringBuffer.samplesAvailable();
|
int numNetworkOutputSamples = _ringBuffer.samplesAvailable();
|
||||||
int numDeviceOutputSamples = numNetworkOutputSamples / networkOutputToOutputRatio;
|
int numDeviceOutputSamples = numNetworkOutputSamples / networkOutputToOutputRatio;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue