mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-19 22:50:29 +00:00
Switch to 32-bit floating point audio
Excluding Steam Link due to CPU and API limitations
This commit is contained in:
@@ -23,7 +23,9 @@ bool SLAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* o
|
||||
// it's hard to avoid since we get crushed by CPU limitations.
|
||||
m_MaxQueuedAudioMs = 40 * opusConfig->channelCount / 2;
|
||||
|
||||
m_AudioBufferSize = opusConfig->samplesPerFrame * sizeof(short) * opusConfig->channelCount;
|
||||
m_AudioBufferSize = opusConfig->samplesPerFrame *
|
||||
opusConfig->channelCount *
|
||||
getAudioBufferSampleSize();
|
||||
m_AudioStream = SLAudio_CreateStream(m_AudioContext,
|
||||
opusConfig->sampleRate,
|
||||
opusConfig->channelCount,
|
||||
@@ -117,6 +119,11 @@ int SLAudioRenderer::getCapabilities()
|
||||
return CAPABILITY_SLOW_OPUS_DECODER | CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION;
|
||||
}
|
||||
|
||||
IAudioRenderer::AudioFormat SLAudioRenderer::getAudioBufferFormat()
|
||||
{
|
||||
return AudioFormat::Sint16NE;
|
||||
}
|
||||
|
||||
void SLAudioRenderer::slLogCallback(void*, ESLAudioLog logLevel, const char *message)
|
||||
{
|
||||
SDL_LogPriority priority;
|
||||
|
||||
Reference in New Issue
Block a user