aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2014-12-30 12:22:00 +0100
committerRainer Hochecker <fernetmenta@online.de>2014-12-30 12:22:00 +0100
commit5e9f56a868eb900f4805b2c8d1a360bd673f39d1 (patch)
tree07828ce4170c671446f96612b61a4e9229b62238
parent0e711ebd624b8b1b35bd3126868f4887bf0ece71 (diff)
wasapi: probe S24 before S32, works around some driver bugs
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
index 56dd641c64..74a35993fe 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
@@ -110,9 +110,13 @@ struct sampleFormat
};
/* Sample formats go from float -> 32 bit int -> 24 bit int (packed in 32) -> -> 24 bit int -> 16 bit int */
+// versions of Kodi before 14.0 had a bug which made S24NE4MSB the first format selected
+// this bug worked around some driver bug of some IEC958 devices which report S32 but can't handle it
+// correctly. So far I have never seen and WASAPI device using S32 and don't think probing S24 before
+// S32 has any negative impact.
static const sampleFormat testFormats[] = { {KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 32, 32, AE_FMT_FLOAT},
- {KSDATAFORMAT_SUBTYPE_PCM, 32, 32, AE_FMT_S32NE},
{KSDATAFORMAT_SUBTYPE_PCM, 32, 24, AE_FMT_S24NE4MSB},
+ {KSDATAFORMAT_SUBTYPE_PCM, 32, 32, AE_FMT_S32NE},
{KSDATAFORMAT_SUBTYPE_PCM, 24, 24, AE_FMT_S24NE3},
{KSDATAFORMAT_SUBTYPE_PCM, 16, 16, AE_FMT_S16NE} };