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
|
|
@ -25,4 +25,19 @@ public:
|
|||
// 4 - Surround Left
|
||||
// 5 - Surround Right
|
||||
}
|
||||
|
||||
enum class AudioFormat {
|
||||
Sint16NE, // 16-bit signed integer (native endian)
|
||||
Float32NE, // 32-bit floating point (native endian)
|
||||
};
|
||||
virtual AudioFormat getAudioBufferFormat() = 0;
|
||||
|
||||
int getAudioBufferSampleSize() {
|
||||
switch (getAudioBufferFormat()) {
|
||||
case IAudioRenderer::AudioFormat::Sint16NE:
|
||||
return sizeof(short);
|
||||
case IAudioRenderer::AudioFormat::Float32NE:
|
||||
return sizeof(float);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue