Merge pull request #4635 from lrusak/pulseaudio-fix

kodi: add patch so pulseaudio is at the end of the list
This commit is contained in:
Lukas Rusak 2016-01-21 00:57:35 -08:00
commit 097e227594

View File

@ -0,0 +1,28 @@
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index fbccce0..597492d 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -1293,6 +1293,22 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
}
}
}
+
+ CAEDeviceInfo pulseDevice;
+ bool found = false;
+ for (AEDeviceInfoList::iterator itl = list.begin(); itl != list.end(); ++itl)
+ {
+ if (itl->m_deviceName == "pulse")
+ {
+ pulseDevice = *itl;
+ found = true;
+ list.erase(itl);
+ break;
+ }
+ }
+ // append pulse device at the end
+ if (found)
+ list.push_back(pulseDevice);
}
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name)