diff options
author | Chris "Koying" Browet <cbro@semperpax.com> | 2014-05-24 15:55:29 +0200 |
---|---|---|
committer | Chris "Koying" Browet <cbro@semperpax.com> | 2014-05-26 11:10:24 +0200 |
commit | f0c388485418aef0f4366b166ff6786f84fb6648 (patch) | |
tree | 7bb5fae7d2b24aec867b168aa423fc6805337813 | |
parent | 3eaeade52336554ba547d2d1e03cd6919e5a1426 (diff) |
FIX: [AE] if null sink is requested, return null sink
-rw-r--r-- | xbmc/cores/AudioEngine/AESinkFactory.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp index e493123a07..e42d9738c5 100644 --- a/xbmc/cores/AudioEngine/AESinkFactory.cpp +++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp @@ -95,32 +95,34 @@ IAESink *CAESinkFactory::TrySink(std::string &driver, std::string &device, AEAud if (driver == "NULL") sink = new CAESinkNULL(); - + else + { #if defined(TARGET_WINDOWS) - else if (driver == "WASAPI") - sink = new CAESinkWASAPI(); - else if (driver == "DIRECTSOUND") - sink = new CAESinkDirectSound(); + if (driver == "WASAPI") + sink = new CAESinkWASAPI(); + if (driver == "DIRECTSOUND") + sink = new CAESinkDirectSound(); #elif defined(TARGET_ANDROID) - sink = new CAESinkAUDIOTRACK(); + sink = new CAESinkAUDIOTRACK(); #elif defined(TARGET_RASPBERRY_PI) - sink = new CAESinkPi(); + sink = new CAESinkPi(); #elif defined(TARGET_DARWIN_IOS) - sink = new CAESinkDARWINIOS(); + sink = new CAESinkDARWINIOS(); #elif defined(TARGET_DARWIN_OSX) - sink = new CAESinkDARWINOSX(); + sink = new CAESinkDARWINOSX(); #elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD) - #if defined(HAS_PULSEAUDIO) - else if (driver == "PULSE") - sink = new CAESinkPULSE(); - #endif - #if defined(HAS_ALSA) - else if (driver == "ALSA") - sink = new CAESinkALSA(); - #endif - else if (driver == "OSS") - sink = new CAESinkOSS(); + #if defined(HAS_PULSEAUDIO) + if (driver == "PULSE") + sink = new CAESinkPULSE(); + #endif + #if defined(HAS_ALSA) + if (driver == "ALSA") + sink = new CAESinkALSA(); + #endif + if (driver == "OSS") + sink = new CAESinkOSS(); #endif + } if (!sink) return NULL; |