mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-18 10:32:38 +00:00
Fixes for experimental Qt audio renderer
This commit is contained in:
parent
f2f8f92172
commit
e3a8f010c3
@ -29,9 +29,8 @@ bool QtAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* o
|
|||||||
|
|
||||||
m_AudioOutput = new QAudioOutput(format);
|
m_AudioOutput = new QAudioOutput(format);
|
||||||
|
|
||||||
m_AudioOutput->setBufferSize(SAMPLES_PER_FRAME * 2);
|
// Buffer 20 ms of audio data
|
||||||
|
m_AudioOutput->setBufferSize(format.bytesForDuration(20000));
|
||||||
qInfo() << "Audio stream buffer:" << m_AudioOutput->bufferSize() << "bytes";
|
|
||||||
|
|
||||||
m_OutputDevice = m_AudioOutput->start();
|
m_OutputDevice = m_AudioOutput->start();
|
||||||
if (m_OutputDevice == nullptr) {
|
if (m_OutputDevice == nullptr) {
|
||||||
@ -39,6 +38,9 @@ bool QtAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* o
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check what buffer size was really used after starting
|
||||||
|
qInfo() << "Audio stream buffer:" << m_AudioOutput->bufferSize() << "bytes";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user