ActiveAE: fix unsigned/signed mismatch
[vuplus_xbmc] / xbmc / cores / AudioEngine / Engines / ActiveAE / ActiveAESink.h
index 559179c..7752a8a 100644 (file)
@@ -38,6 +38,7 @@ struct SinkConfig
 {
   AEAudioFormat format;
   CEngineStats *stats;
+  const std::string *device;
 };
 
 class CSinkControlProtocol : public Protocol
@@ -49,7 +50,9 @@ public:
     CONFIGURE,
     UNCONFIGURE,
     SILENCEMODE,
+    ISCOMPATIBLE,
     VOLUME,
+    FLUSH,
     TIMEOUT,
   };
   enum InSignal
@@ -80,13 +83,14 @@ class CActiveAESink : private CThread
 {
 public:
   CActiveAESink(CEvent *inMsgEvent);
-  void EnumerateSinkList();
+  void EnumerateSinkList(bool force);
   void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough);
   std::string GetDefaultDevice(bool passthrough);
   void Start();
   void Dispose();
-  bool IsCompatible(const AEAudioFormat format, const std::string &device);
   bool HasVolume();
+  AEDeviceType GetDeviceType(const std::string &device);
+  bool HasPassthroughDevice();
   CSinkControlProtocol m_controlPort;
   CSinkDataProtocol m_dataPort;
 
@@ -97,6 +101,7 @@ protected:
   void GetDeviceFriendlyName(std::string &device);
   void OpenSink();
   void ReturnBuffers();
+  bool IsCompatible(const AEAudioFormat format, const std::string &device);
 
   unsigned int OutputSamples(CSampleBuffer* samples);
   void ConvertInit(CSampleBuffer* samples);
@@ -111,11 +116,10 @@ protected:
   bool m_bStateMachineSelfTrigger;
   int m_extTimeout;
   bool m_extError;
-  bool m_extSilence;
-  int m_extCycleCounter;
+  unsigned int m_extSilenceTimeout;
+  XbmcThreads::EndTime m_extSilenceTimer;
 
   CSampleBuffer m_sampleOfSilence;
-  CSampleBuffer m_sampleOfNoise;
   uint8_t *m_convertBuffer;
   int m_convertBufferSampleSize;
   CAEConvert::AEConvertFrFn m_convertFn;
@@ -128,6 +132,7 @@ protected:
   } m_convertState;
 
   std::string m_deviceFriendlyName;
+  std::string m_device;
   AESinkInfoList m_sinkInfoList;
   IAESink *m_sink;
   AEAudioFormat m_sinkFormat, m_requestedFormat;