mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-23 16:15:02 +00:00
parent
e76551cb64
commit
0ac765bc32
1 changed files with 7 additions and 0 deletions
|
@ -31,7 +31,14 @@ bool SdlAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION*
|
|||
// to mitigate this issue. Otherwise, we will buffer up to 3 frames of audio which
|
||||
// is 15 ms at regular 5 ms frames and 30 ms at 10 ms frames for slow connections.
|
||||
// The buffering helps avoid audio underruns due to network jitter.
|
||||
#ifndef Q_OS_DARWIN
|
||||
want.samples = SDL_max(480, opusConfig->samplesPerFrame * 3);
|
||||
#else
|
||||
// HACK: Changing the buffer size can lead to Bluetooth HFP
|
||||
// audio issues on macOS, so we're leaving this alone.
|
||||
// https://github.com/moonlight-stream/moonlight-qt/issues/1071
|
||||
want.samples = SDL_max(480, opusConfig->samplesPerFrame);
|
||||
#endif
|
||||
|
||||
m_FrameSize = opusConfig->samplesPerFrame * sizeof(short) * opusConfig->channelCount;
|
||||
|
||||
|
|
Loading…
Reference in a new issue