mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 06:57:50 +00:00
kodi: update alsa/pulse patch after PR13119
This commit is contained in:
parent
219a08aade
commit
cbed03d62b
@ -1,79 +1,126 @@
|
||||
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)
|
||||
commit 81214c86f437863c0a8f4ac2e45de81fccc621b4
|
||||
Author: Lukas Rusak <lorusak@gmail.com>
|
||||
Date: Mon Dec 11 23:44:41 2017 -0800
|
||||
|
||||
[linux] allow using alsa and pulse together
|
||||
|
||||
diff --git a/xbmc/windowing/X11/WinSystemX11GLContext.cpp b/xbmc/windowing/X11/WinSystemX11GLContext.cpp
|
||||
index 24394d7631..0914d28820 100644
|
||||
--- a/xbmc/windowing/X11/WinSystemX11GLContext.cpp
|
||||
+++ b/xbmc/windowing/X11/WinSystemX11GLContext.cpp
|
||||
@@ -52,31 +52,8 @@ std::unique_ptr<CWinSystemBase> CWinSystemBase::CreateWinSystem()
|
||||
|
||||
info.m_deviceInfoList.clear();
|
||||
@@ -253,21 +273,20 @@
|
||||
CLog::Log(LOGNOTICE, "User specified Sink %s could not be enumerated", envSink.c_str());
|
||||
}
|
||||
CWinSystemX11GLContext::CWinSystemX11GLContext()
|
||||
{
|
||||
- std::string envSink;
|
||||
- if (getenv("AE_SINK"))
|
||||
- envSink = getenv("AE_SINK");
|
||||
- if (StringUtils::EqualsNoCase(envSink, "ALSA"))
|
||||
- {
|
||||
- X11::ALSARegister();
|
||||
- }
|
||||
- else if (StringUtils::EqualsNoCase(envSink, "PULSE"))
|
||||
- {
|
||||
- X11::PulseAudioRegister();
|
||||
- }
|
||||
- else if (StringUtils::EqualsNoCase(envSink, "SNDIO"))
|
||||
- {
|
||||
- X11::SndioRegister();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (!X11::PulseAudioRegister())
|
||||
- {
|
||||
- if (!X11::ALSARegister())
|
||||
- {
|
||||
- X11::SndioRegister();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ X11::ALSARegister();
|
||||
+ X11::PulseAudioRegister();
|
||||
}
|
||||
|
||||
- #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
|
||||
CWinSystemX11GLContext::~CWinSystemX11GLContext()
|
||||
diff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
|
||||
index 4b8199760e..e50a31daf9 100644
|
||||
--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
|
||||
+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
|
||||
@@ -32,6 +32,7 @@
|
||||
// AESink Factory
|
||||
#include "cores/AudioEngine/AESinkFactory.h"
|
||||
#include "cores/AudioEngine/Sinks/AESinkALSA.h"
|
||||
+#include "cores/AudioEngine/Sinks/AESinkPULSE.h"
|
||||
#include "guilib/GraphicContext.h"
|
||||
#include "guilib/Resolution.h"
|
||||
#include "settings/Settings.h"
|
||||
@@ -78,6 +79,7 @@ CWinSystemAmlogic::CWinSystemAmlogic()
|
||||
// Register sink
|
||||
AE::CAESinkFactory::ClearSinks();
|
||||
CAESinkALSA::Register();
|
||||
+ CAESinkPULSE::Register();
|
||||
}
|
||||
|
||||
- #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);
|
||||
CWinSystemAmlogic::~CWinSystemAmlogic()
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbm.cpp b/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
index 3ef426f677..7a1dfe1c8e 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
@@ -37,31 +37,8 @@ CWinSystemGbm::CWinSystemGbm() :
|
||||
m_nativeDisplay(nullptr),
|
||||
m_nativeWindow(nullptr)
|
||||
{
|
||||
- std::string envSink;
|
||||
- if (getenv("AE_SINK"))
|
||||
- envSink = getenv("AE_SINK");
|
||||
- if (StringUtils::EqualsNoCase(envSink, "ALSA"))
|
||||
- {
|
||||
- GBM::ALSARegister();
|
||||
- }
|
||||
- else if (StringUtils::EqualsNoCase(envSink, "PULSE"))
|
||||
- {
|
||||
- GBM::PulseAudioRegister();
|
||||
- }
|
||||
- else if (StringUtils::EqualsNoCase(envSink, "SNDIO"))
|
||||
- {
|
||||
- GBM::SndioRegister();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (!GBM::PulseAudioRegister())
|
||||
- {
|
||||
- if (!GBM::ALSARegister())
|
||||
- {
|
||||
- GBM::SndioRegister();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ GBM::ALSARegister();
|
||||
+ GBM::PulseAudioRegister();
|
||||
|
||||
m_winEvents.reset(new CWinEventsLinux());
|
||||
}
|
||||
diff --git a/xbmc/windowing/rpi/WinSystemRpi.cpp b/xbmc/windowing/rpi/WinSystemRpi.cpp
|
||||
index 9e7f8bd9be..464cf1342b 100644
|
||||
--- a/xbmc/windowing/rpi/WinSystemRpi.cpp
|
||||
+++ b/xbmc/windowing/rpi/WinSystemRpi.cpp
|
||||
@@ -34,7 +34,9 @@
|
||||
#include "utils/log.h"
|
||||
#include "../WinEventsLinux.h"
|
||||
#include "cores/AudioEngine/AESinkFactory.h"
|
||||
+#include "cores/AudioEngine/Sinks/AESinkALSA.h"
|
||||
#include "cores/AudioEngine/Sinks/AESinkPi.h"
|
||||
+#include "cores/AudioEngine/Sinks/AESinkPULSE.h"
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglplatform.h>
|
||||
@@ -55,6 +57,8 @@ CWinSystemRpi::CWinSystemRpi()
|
||||
m_winEvents.reset(new CWinEventsLinux());
|
||||
AE::CAESinkFactory::ClearSinks();
|
||||
CAESinkPi::Register();
|
||||
+ CAESinkALSA::Register();
|
||||
+ CAESinkPULSE::Register();
|
||||
}
|
||||
|
||||
CWinSystemRpi::~CWinSystemRpi()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user