mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-26 05:50:49 +00:00
Switch to 32-bit floating point audio
Excluding Steam Link due to CPU and API limitations
This commit is contained in:
1 parent
8ac378f467
commit
7f009a4b8e
8 files changed
+69
-17
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user