diff options
author | jenkins4kodi <jenkins4kodi@users.noreply.github.com> | 2016-06-25 19:42:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-25 19:42:09 +0200 |
commit | c25ded783c2419c7e7877e1095b92cb2f83bea1d (patch) | |
tree | 2a1a33b0ed3f1c13c23a10d59e60197224ffa06d | |
parent | d9fd7743066445b78ae8bb1b64a0ab3ab079f2aa (diff) | |
parent | 8c6f32644f06e0fbef449eb9c92cc634ce6d6f1f (diff) |
Merge pull request #10022 from fritsch/pulse384
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp index 7c669b70f7..6edde865f5 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp @@ -577,9 +577,13 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device) return false; } - // Pulse can resample everything between 1 hz and 192000 hz + // Pulse can resample everything between 1 hz and 192000 hz / 384000 hz (starting with 9.0) // Make sure we are in the range that we originally added - format.m_sampleRate = std::max(5512U, std::min(format.m_sampleRate, 192000U)); + unsigned int max_pulse_sample_rate = 192000U; +#if PA_CHECK_VERSION(9,0,0) + max_pulse_sample_rate = 384000U; +#endif + format.m_sampleRate = std::max(5512U, std::min(format.m_sampleRate, max_pulse_sample_rate)); pa_format_info *info[1]; info[0] = pa_format_info_new(); |