mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
kodi: remove old patch and replace with new pulseaudio patch
This commit is contained in:
parent
f36181a463
commit
2f263c4c89
@ -1,28 +0,0 @@
|
||||
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)
|
||||
|
@ -0,0 +1,79 @@
|
||||
diff -Naur a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp
|
||||
--- a/xbmc/cores/AudioEngine/AESinkFactory.cpp 2016-01-12 22:00:19.000000000 +0100
|
||||
+++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp 2016-01-25 10:25:46.375653966 +0100
|
||||
@@ -28,6 +28,9 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
#include "Sinks/AESinkPi.h"
|
||||
#include "Sinks/AESinkALSA.h"
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ #include "Sinks/AESinkPULSE.h"
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
#include "Sinks/AESinkDARWINIOS.h"
|
||||
#elif defined(TARGET_DARWIN_OSX)
|
||||
@@ -67,6 +70,9 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
driver == "PI" ||
|
||||
driver == "ALSA" ||
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ driver == "PULSE" ||
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
driver == "DARWINIOS" ||
|
||||
#elif defined(TARGET_DARWIN_OSX)
|
||||
@@ -108,6 +114,10 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
if (driver == "PI")
|
||||
sink = new CAESinkPi();
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ if (driver == "PULSE")
|
||||
+ sink = new CAESinkPULSE();
|
||||
+ #endif
|
||||
#if defined(HAS_ALSA)
|
||||
if (driver == "ALSA")
|
||||
sink = new CAESinkALSA();
|
||||
@@ -209,6 +219,16 @@
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
list.push_back(info);
|
||||
#endif
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ info.m_deviceInfoList.clear();
|
||||
+ info.m_sinkName = "PULSE";
|
||||
+ CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ if(!info.m_deviceInfoList.empty())
|
||||
+ {
|
||||
+ list.push_back(info);
|
||||
+ return;
|
||||
+ }
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
|
||||
info.m_deviceInfoList.clear();
|
||||
@@ -253,21 +273,20 @@
|
||||
CLog::Log(LOGNOTICE, "User specified Sink %s could not be enumerated", envSink.c_str());
|
||||
}
|
||||
|
||||
- #if defined(HAS_PULSEAUDIO)
|
||||
+ #if defined(HAS_ALSA)
|
||||
info.m_deviceInfoList.clear();
|
||||
- info.m_sinkName = "PULSE";
|
||||
- CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ info.m_sinkName = "ALSA";
|
||||
+ CAESinkALSA::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
{
|
||||
list.push_back(info);
|
||||
- return;
|
||||
}
|
||||
#endif
|
||||
|
||||
- #if defined(HAS_ALSA)
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
info.m_deviceInfoList.clear();
|
||||
- info.m_sinkName = "ALSA";
|
||||
- CAESinkALSA::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ info.m_sinkName = "PULSE";
|
||||
+ CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
{
|
||||
list.push_back(info);
|
Loading…
x
Reference in New Issue
Block a user