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
|
|
@ -164,7 +164,7 @@ bool SoundIoAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATI
|
|||
|
||||
m_AudioPacketDuration = (opusConfig->samplesPerFrame / (opusConfig->sampleRate / 1000)) / 1000.0;
|
||||
|
||||
m_OutputStream->format = SoundIoFormatS16NE;
|
||||
m_OutputStream->format = SoundIoFormatFloat32NE;
|
||||
m_OutputStream->sample_rate = opusConfig->sampleRate;
|
||||
m_OutputStream->software_latency = m_AudioPacketDuration;
|
||||
m_OutputStream->name = "Moonlight";
|
||||
|
|
@ -323,6 +323,11 @@ int SoundIoAudioRenderer::getCapabilities()
|
|||
return CAPABILITY_DIRECT_SUBMIT /* | CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION */;
|
||||
}
|
||||
|
||||
IAudioRenderer::AudioFormat SoundIoAudioRenderer::getAudioBufferFormat()
|
||||
{
|
||||
return AudioFormat::Float32NE;
|
||||
}
|
||||
|
||||
void SoundIoAudioRenderer::sioErrorCallback(SoundIoOutStream* stream, int err)
|
||||
{
|
||||
auto me = reinterpret_cast<SoundIoAudioRenderer*>(stream->userdata);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue