Skip to content
This repository
Browse code

Merge pull request #3278 from t-nelson/ae_fixes

AE nits
  • Loading branch information...
commit 95a165e5e6f93f9284ccc4a64cccdab7922196c8 2 parents b23fae6 + 8abcd38
Martijn Kaijser authored September 16, 2013

Showing 32 changed files with 36 additions and 53 deletions. Show diff stats Hide diff stats

  1. 27  xbmc/cores/AudioEngine/AEFactory.cpp
  2. 2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h
  3. 2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h
  4. 2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp
  5. 2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
  6. 2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAESound.cpp
  7. 2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h
  8. 2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.h
  9. 2  xbmc/cores/AudioEngine/Engines/CoreAudio/ICoreAudioAEHAL.h
  10. 2  xbmc/cores/AudioEngine/Engines/CoreAudio/ICoreAudioSource.h
  11. 2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
  12. 2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp
  13. 2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h
  14. 2  xbmc/cores/AudioEngine/Interfaces/AE.h
  15. 2  xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
  16. 2  xbmc/cores/AudioEngine/Interfaces/AESink.h
  17. 2  xbmc/cores/AudioEngine/Interfaces/AEStream.h
  18. 2  xbmc/cores/AudioEngine/{ → Utils}/AEAudioFormat.h
  19. 2  xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
  20. 2  xbmc/cores/AudioEngine/Utils/AEChannelInfo.h
  21. 2  xbmc/cores/AudioEngine/Utils/AEConvert.h
  22. 2  xbmc/cores/AudioEngine/Utils/AEDeviceInfo.h
  23. 2  xbmc/cores/AudioEngine/Utils/AELimiter.h
  24. 2  xbmc/cores/AudioEngine/Utils/AERemap.h
  25. 2  xbmc/cores/AudioEngine/Utils/AEUtil.h
  26. 2  xbmc/cores/AudioEngine/Utils/AEWAVLoader.h
  27. 2  xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h
  28. 2  xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.h
  29. 2  xbmc/cores/dvdplayer/DVDPlayerAudio.h
  30. 2  xbmc/cores/omxplayer/OMXAudio.h
  31. 2  xbmc/cores/omxplayer/OMXAudioCodecOMX.h
  32. 2  xbmc/cores/paplayer/ICodec.h
27  xbmc/cores/AudioEngine/AEFactory.cpp
@@ -49,13 +49,14 @@ IAE *CAEFactory::GetEngine()
49 49
 
50 50
 bool CAEFactory::LoadEngine()
51 51
 {
  52
+  bool loaded = false;
  53
+
52 54
 #if defined(TARGET_RASPBERRY_PI)
53 55
   return true;
  56
+#elif defined(TARGET_DARWIN)
  57
+  return CAEFactory::LoadEngine(AE_ENGINE_COREAUDIO);
54 58
 #endif
55 59
 
56  
-  bool loaded = false;
57  
-
58  
-#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
59 60
   std::string engine;
60 61
   if (getenv("AE_ENGINE"))
61 62
   {
@@ -66,39 +67,21 @@ bool CAEFactory::LoadEngine()
66 67
     if (!loaded && engine == "PULSE")
67 68
       loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE);
68 69
     #endif
  70
+    
69 71
     if (!loaded && engine == "SOFT" )
70 72
       loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT);
71  
-    if (!loaded && engine == "ACTIVE")
72  
-      loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE);
73  
-  }
74  
-#endif
75 73
 
76  
-#if defined(TARGET_WINDOWS)
77  
-  std::string engine;
78  
-  if (getenv("AE_ENGINE"))
79  
-  {
80  
-    engine = (std::string)getenv("AE_ENGINE");
81  
-    std::transform(engine.begin(), engine.end(), engine.begin(), ::toupper);
82  
-
83  
-    if (!loaded && engine == "SOFT" )
84  
-      loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT);
85 74
     if (!loaded && engine == "ACTIVE")
86 75
       loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE);
87 76
   }
88  
-#endif
89 77
 
90 78
 #if defined(HAS_PULSEAUDIO)
91 79
   if (!loaded)
92 80
     loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE);
93 81
 #endif
94 82
 
95  
-#if defined(TARGET_DARWIN)
96  
-  if (!loaded)
97  
-    loaded = CAEFactory::LoadEngine(AE_ENGINE_COREAUDIO);
98  
-#else
99 83
   if (!loaded)
100 84
     loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE);
101  
-#endif
102 85
 
103 86
   return loaded;
104 87
 }
2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "DllAvUtil.h"
23 23
 #include "DllSwResample.h"
24  
-#include "AEAudioFormat.h"
  24
+#include "Utils/AEAudioFormat.h"
25 25
 #include "Interfaces/AE.h"
26 26
 #include <deque>
27 27
 
2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h
@@ -22,7 +22,7 @@
22 22
 #include "DllAvUtil.h"
23 23
 #include "DllSwResample.h"
24 24
 #include "Utils/AEChannelInfo.h"
25  
-#include "AEAudioFormat.h"
  25
+#include "Utils/AEAudioFormat.h"
26 26
 #include "ActiveAEBuffer.h"
27 27
 #include "Interfaces/AE.h"
28 28
 
2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp
@@ -21,7 +21,7 @@
21 21
 #include "Interfaces/AESound.h"
22 22
 
23 23
 #include "AEFactory.h"
24  
-#include "AEAudioFormat.h"
  24
+#include "Utils/AEAudioFormat.h"
25 25
 #include "ActiveAE.h"
26 26
 #include "ActiveAESound.h"
27 27
 #include "utils/log.h"
2  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
@@ -19,8 +19,8 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "AEAudioFormat.h"
23 22
 #include "Interfaces/AEStream.h"
  23
+#include "Utils/AEAudioFormat.h"
24 24
 #include "Utils/AELimiter.h"
25 25
 #include "Utils/AEConvert.h"
26 26
 
2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAESound.cpp
@@ -25,7 +25,7 @@
25 25
 #include "CoreAudioAE.h"
26 26
 #include "threads/SingleLock.h"
27 27
 #include "cores/AudioEngine/AEFactory.h"
28  
-#include "cores/AudioEngine/AEAudioFormat.h"
  28
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
29 29
 #include "cores/AudioEngine/Interfaces/AESound.h"
30 30
 #include "cores/AudioEngine/Utils/AEConvert.h"
31 31
 #include "cores/AudioEngine/Utils/AERemap.h"
2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h
@@ -23,7 +23,7 @@
23 23
 #include <list>
24 24
 
25 25
 #include "ICoreAudioSource.h"
26  
-#include "cores/AudioEngine/AEAudioFormat.h"
  26
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
27 27
 #include "cores/AudioEngine/Interfaces/AEStream.h"
28 28
 #include "cores/AudioEngine/Utils/AEConvert.h"
29 29
 #include "cores/AudioEngine/Utils/AERemap.h"
2  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.h
@@ -23,7 +23,7 @@
23 23
 
24 24
 #if defined(TARGET_DARWIN_OSX)
25 25
 
26  
-#include "cores/AudioEngine/AEAudioFormat.h"
  26
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
27 27
 
28 28
 #include <CoreAudio/CoreAudio.h>
29 29
 
2  xbmc/cores/AudioEngine/Engines/CoreAudio/ICoreAudioAEHAL.h
@@ -19,7 +19,7 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "cores/AudioEngine/AEAudioFormat.h"
  22
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
23 23
 #include "cores/AudioEngine/Interfaces/AE.h"
24 24
 #include "ICoreAudioSource.h"
25 25
 
2  xbmc/cores/AudioEngine/Engines/CoreAudio/ICoreAudioSource.h
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include <AudioUnit/AudioUnit.h>
23 23
 
24  
-#include "cores/AudioEngine/AEAudioFormat.h"
  24
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
25 25
 #include "cores/AudioEngine/Interfaces/AE.h"
26 26
 #include "utils/StdString.h"
27 27
 
2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
@@ -30,7 +30,7 @@
30 30
 
31 31
 #include "Interfaces/ThreadedAE.h"
32 32
 #include "Utils/AEBuffer.h"
33  
-#include "AEAudioFormat.h"
  33
+#include "Utils/AEAudioFormat.h"
34 34
 #include "AESinkFactory.h"
35 35
 
36 36
 #include "SoftAEStream.h"
2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp
@@ -26,7 +26,7 @@
26 26
 #include "utils/EndianSwap.h"
27 27
 
28 28
 #include "AEFactory.h"
29  
-#include "AEAudioFormat.h"
  29
+#include "Utils/AEAudioFormat.h"
30 30
 
31 31
 #include "SoftAE.h"
32 32
 #include "SoftAESound.h"
2  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h
@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "threads/SharedSection.h"
26 26
 
27  
-#include "AEAudioFormat.h"
  27
+#include "Utils/AEAudioFormat.h"
28 28
 #include "Interfaces/AEStream.h"
29 29
 #include "Utils/AEConvert.h"
30 30
 #include "Utils/AERemap.h"
2  xbmc/cores/AudioEngine/Interfaces/AE.h
@@ -25,7 +25,7 @@
25 25
 #include "system.h"
26 26
 #include "threads/CriticalSection.h"
27 27
 
28  
-#include "../AEAudioFormat.h"
  28
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
29 29
 
30 30
 typedef std::pair<std::string, std::string> AEDevice;
31 31
 typedef std::vector<AEDevice> AEDeviceList;
2  xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
@@ -20,7 +20,7 @@
20 20
  */
21 21
 
22 22
 #include "DllAvCodec.h"
23  
-#include "cores/AudioEngine/AEAudioFormat.h"
  23
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
24 24
 
25 25
 /**
26 26
  * IAEEncoder interface for on the fly audio compression
2  xbmc/cores/AudioEngine/Interfaces/AESink.h
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "threads/Thread.h"
23 23
 #include "AE.h"
24  
-#include "AEAudioFormat.h"
  24
+#include "Utils/AEAudioFormat.h"
25 25
 #include "utils/StdString.h"
26 26
 #include <stdint.h>
27 27
 
2  xbmc/cores/AudioEngine/Interfaces/AEStream.h
@@ -19,7 +19,7 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "../AEAudioFormat.h"
  22
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
23 23
 #include "cores/IAudioCallback.h"
24 24
 #include <stdint.h>
25 25
 
2  xbmc/cores/AudioEngine/AEAudioFormat.h → xbmc/cores/AudioEngine/Utils/AEAudioFormat.h
@@ -19,7 +19,7 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "Utils/AEChannelInfo.h"
  22
+#include "AEChannelInfo.h"
23 23
 
24 24
 /**
25 25
  * The various data formats
2  xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
@@ -221,7 +221,7 @@ const enum AEChannel CAEChannelInfo::operator[](unsigned int i) const
221 221
   return m_channels[i];
222 222
 }
223 223
 
224  
-CAEChannelInfo::operator std::string()
  224
+CAEChannelInfo::operator std::string() const
225 225
 {
226 226
   if (m_channelCount == 0)
227 227
     return "NULL";
2  xbmc/cores/AudioEngine/Utils/AEChannelInfo.h
@@ -83,7 +83,7 @@ class CAEChannelInfo {
83 83
   CAEChannelInfo& operator+=(const enum AEChannel& rhs);
84 84
   CAEChannelInfo& operator-=(const enum AEChannel& rhs);
85 85
   const enum AEChannel operator[](unsigned int i) const;
86  
-  operator std::string();
  86
+  operator std::string() const;
87 87
 
88 88
   /* remove any channels that dont exist in the provided info */
89 89
   void ResolveChannels(const CAEChannelInfo& rhs);
2  xbmc/cores/AudioEngine/Utils/AEConvert.h
@@ -20,7 +20,7 @@
20 20
  */
21 21
 
22 22
 #include <stdint.h>
23  
-#include "../AEAudioFormat.h"
  23
+#include "AEAudioFormat.h"
24 24
 
25 25
 class CAEConvert{
26 26
 private:
2  xbmc/cores/AudioEngine/Utils/AEDeviceInfo.h
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include <string>
23 23
 #include <vector>
24  
-#include "cores/AudioEngine/AEAudioFormat.h"
  24
+#include "AEAudioFormat.h"
25 25
 #include "cores/AudioEngine/Utils/AEChannelInfo.h"
26 26
 
27 27
 typedef std::vector<unsigned int     > AESampleRateList;
2  xbmc/cores/AudioEngine/Utils/AELimiter.h
@@ -20,7 +20,7 @@
20 20
  */
21 21
 
22 22
 #include <algorithm>
23  
-#include "cores/AudioEngine/AEAudioFormat.h"
  23
+#include "AEAudioFormat.h"
24 24
 
25 25
 class CAELimiter
26 26
 {
2  xbmc/cores/AudioEngine/Utils/AERemap.h
@@ -19,7 +19,7 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "cores/AudioEngine/AEAudioFormat.h"
  22
+#include "AEAudioFormat.h"
23 23
 
24 24
 class CAERemap {
25 25
 public:
2  xbmc/cores/AudioEngine/Utils/AEUtil.h
@@ -19,7 +19,7 @@
19 19
  *
20 20
  */
21 21
 
22  
-#include "../AEAudioFormat.h"
  22
+#include "AEAudioFormat.h"
23 23
 #include "utils/StdString.h"
24 24
 #include "PlatformDefs.h"
25 25
 #include <math.h>
2  xbmc/cores/AudioEngine/Utils/AEWAVLoader.h
@@ -20,7 +20,7 @@
20 20
  */
21 21
 
22 22
 #include "utils/StdString.h"
23  
-#include "cores/AudioEngine/AEAudioFormat.h"
  23
+#include "AEAudioFormat.h"
24 24
 
25 25
 class CAEWAVLoader
26 26
 {
2  xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h
@@ -21,7 +21,7 @@
21 21
  */
22 22
 
23 23
 #include "system.h"
24  
-#include "cores/AudioEngine/AEAudioFormat.h"
  24
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
25 25
 
26 26
 #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS)
27 27
   #include "config.h"
2  xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.h
@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "system.h"
26 26
 #include "DVDAudioCodec.h"
27  
-#include "cores/AudioEngine/AEAudioFormat.h"
  27
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
28 28
 #include "cores/AudioEngine/Utils/AEStreamInfo.h"
29 29
 #include "cores/AudioEngine/Utils/AEBitstreamPacker.h"
30 30
 
2  xbmc/cores/dvdplayer/DVDPlayerAudio.h
@@ -28,7 +28,7 @@
28 28
 #include "DVDStreamInfo.h"
29 29
 #include "utils/BitstreamStats.h"
30 30
 
31  
-#include "cores/AudioEngine/AEAudioFormat.h"
  31
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
32 32
 
33 33
 #include <list>
34 34
 #include <queue>
2  xbmc/cores/omxplayer/OMXAudio.h
@@ -27,7 +27,7 @@
27 27
 #pragma once
28 28
 #endif // _MSC_VER > 1000
29 29
 
30  
-#include "cores/AudioEngine/AEAudioFormat.h"
  30
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
31 31
 #include "cores/AudioEngine/Utils/AEUtil.h"
32 32
 #include "cores/AudioEngine/Utils/AERemap.h"
33 33
 #include "cores/IAudioCallback.h"
2  xbmc/cores/omxplayer/OMXAudioCodecOMX.h
@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23  
-#include "cores/AudioEngine/AEAudioFormat.h"
  23
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
24 24
 #include "DllAvCodec.h"
25 25
 #include "DllAvFormat.h"
26 26
 #include "DllAvUtil.h"
2  xbmc/cores/paplayer/ICodec.h
@@ -24,7 +24,7 @@
24 24
 #include "filesystem/File.h"
25 25
 #include "music/tags/MusicInfoTag.h"
26 26
 
27  
-#include "cores/AudioEngine/AEAudioFormat.h"
  27
+#include "cores/AudioEngine/Utils/AEAudioFormat.h"
28 28
 
29 29
 #define READ_EOF      -1
30 30
 #define READ_SUCCESS   0

0 notes on commit 95a165e

Please sign in to comment.
Something went wrong with that request. Please try again.