Switch to 32-bit floating point audio
Excluding Steam Link due to CPU and API limitations
This commit is contained in:
parent
8ac378f467
commit
7f009a4b8e
8 changed files with 69 additions and 17 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue