All pastes #1458183 Raw Edit

Untitled

public text v1 · immutable
#1458183 ·published 2009-06-12 20:20 UTC
rendered paste body
Index: xbmc/cores/AudioRenderers/CoreAudioRenderer.cpp
===================================================================
--- xbmc/cores/AudioRenderers/CoreAudioRenderer.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/CoreAudioRenderer.cpp	(arbetskopia)
@@ -409,9 +409,9 @@
   return true;
 }
 
-HRESULT CCoreAudioRenderer::Deinitialize()
+bool CCoreAudioRenderer::Deinitialize()
 {
-  VERIFY_INIT(S_OK); // Not really a failure if we weren't initialized
+  VERIFY_INIT(true); // Not really a failure if we weren't initialized
 
   // Stop rendering
   Stop();
@@ -432,15 +432,15 @@
   
   CLog::Log(LOGINFO, "CoreAudioRenderer::Deinitialize: Renderer has been shut down.");
   
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
 // Transport control methods
 //***********************************************************************************************
-HRESULT CCoreAudioRenderer::Pause()
+bool CCoreAudioRenderer::Pause()
 {
-  VERIFY_INIT(E_FAIL);
+  VERIFY_INIT(false);
   
   if (!m_Pause)
   {
@@ -452,12 +452,12 @@
     m_Pause = true;
   }
   m_PerfMon.EnableWatchdog(false); // Stop monitoring, we're paused
-  return S_OK;
+  return true;
 }
 
-HRESULT CCoreAudioRenderer::Resume()
+bool CCoreAudioRenderer::Resume()
 {
-  VERIFY_INIT(E_FAIL);
+  VERIFY_INIT(false);
 
   if (m_Pause)
   {
@@ -469,12 +469,12 @@
     m_Pause = false;
   }
   m_PerfMon.EnableWatchdog(true); // Resume monitoring
-  return S_OK;
+  return true;
 }
 
-HRESULT CCoreAudioRenderer::Stop()
+bool CCoreAudioRenderer::Stop()
 {
-  VERIFY_INIT(E_FAIL);
+  VERIFY_INIT(false);
 
   if (m_Passthrough)
     m_AudioDevice.Stop();
@@ -485,7 +485,7 @@
   m_PerfMon.EnableWatchdog(false);
   m_pCache->Clear();
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
@@ -514,9 +514,9 @@
     SetCurrentVolume(m_CurrentVolume);
 }
 
-HRESULT CCoreAudioRenderer::SetCurrentVolume(LONG nVolume)
+bool CCoreAudioRenderer::SetCurrentVolume(LONG nVolume)
 {  
-  VERIFY_INIT(E_FAIL);
+  VERIFY_INIT(false);
 
   if (m_EnableVolumeControl) // Don't change actual volume for encoded streams
   {  
@@ -525,10 +525,10 @@
     
     // Try to set the volume. If it fails there is not a lot to be done.
     if (!m_AudioUnit.SetCurrentVolume(volPct))
-      return E_FAIL;
+      return false;
   }
   m_CurrentVolume = nVolume; // Store the volume setpoint. We need this to check for 'mute'
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
@@ -561,7 +561,7 @@
   return bytesUsed; // Number of bytes added to cache;
 }
 
-FLOAT CCoreAudioRenderer::GetDelay()
+float CCoreAudioRenderer::GetDelay()
 {
   VERIFY_INIT(0);
   // Calculate the duration of the data in the cache
@@ -570,7 +570,7 @@
   return delay;
 }
 
-FLOAT CCoreAudioRenderer::GetCacheTime()
+float CCoreAudioRenderer::GetCacheTime()
 {
   return GetDelay();
 }
Index: xbmc/cores/AudioRenderers/Win32DirectSound.cpp
===================================================================
--- xbmc/cores/AudioRenderers/Win32DirectSound.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/Win32DirectSound.cpp	(arbetskopia)
@@ -180,7 +180,7 @@
 }
 
 //***********************************************************************************************
-HRESULT CWin32DirectSound::Deinitialize()
+bool CWin32DirectSound::Deinitialize()
 {
   if (m_bIsAllocated)
   {
@@ -201,36 +201,36 @@
 
     g_audioContext.SetActiveDevice(CAudioContext::DEFAULT_DEVICE);
   }
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CWin32DirectSound::Pause()
+bool CWin32DirectSound::Pause()
 {
   CSingleLock lock (m_critSection);
   if (m_bPause) // Already paused
-    return S_OK;
+    return true;
   m_bPause = true;
   m_pBuffer->Stop();
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CWin32DirectSound::Resume()
+bool CWin32DirectSound::Resume()
 {
   CSingleLock lock (m_critSection);
   if (!m_bPause) // Already playing
-    return S_OK;
+    return true;
   m_bPause = false;
   if (m_CacheLen > m_PreCacheSize) // Make sure we have some data to play (if not, playback will start when we add some)
     m_pBuffer->Play(0, 0, DSBPLAY_LOOPING);
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CWin32DirectSound::Stop()
+bool CWin32DirectSound::Stop()
 {
   CSingleLock lock (m_critSection);
   // Stop and reset DirectSound buffer
@@ -242,23 +242,23 @@
   m_CacheLen = 0;
   m_bPause = false;
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-LONG CWin32DirectSound::GetMinimumVolume() const
+long CWin32DirectSound::GetMinimumVolume() const
 {
   return DSBVOLUME_MIN;
 }
 
 //***********************************************************************************************
-LONG CWin32DirectSound::GetMaximumVolume() const
+long CWin32DirectSound::GetMaximumVolume() const
 {
   return DSBVOLUME_MAX;
 }
 
 //***********************************************************************************************
-LONG CWin32DirectSound::GetCurrentVolume() const
+long CWin32DirectSound::GetCurrentVolume() const
 {
   return m_nCurrentVolume;
 }
@@ -275,7 +275,7 @@
 }
 
 //***********************************************************************************************
-HRESULT CWin32DirectSound::SetCurrentVolume(LONG nVolume)
+bool CWin32DirectSound::SetCurrentVolume(long nVolume)
 {
   CSingleLock lock (m_critSection);
   if (!m_bIsAllocated) return -1;
@@ -284,16 +284,16 @@
 }
 
 //***********************************************************************************************
-DWORD CWin32DirectSound::AddPackets(const void* data, DWORD len)
+unsigned int CWin32DirectSound::AddPackets(const void* data, unsigned int len)
 {
   CSingleLock lock (m_critSection);
-  DWORD total = len;
+  unsigned int total = len;
   unsigned char* pBuffer = (unsigned char*)data;
 
   while (len >= m_dwChunkSize && GetSpace() >= m_dwChunkSize) // We want to write at least one chunk at a time
   {
     LPVOID start = NULL, startWrap = NULL;
-    DWORD  size = 0, sizeWrap = 0;
+    unsigned int  size = 0, sizeWrap = 0;
 
     if (m_BufferOffset >= m_dwBufferLen) // Wrap-around manually
       m_BufferOffset = 0;
@@ -334,7 +334,7 @@
   if (time == m_LastCacheCheck)
     return; // Don't recalc more frequently than once/ms (that is our max resolution anyway)
 
-  DWORD playCursor = 0, writeCursor = 0;
+  unsigned int playCursor = 0, writeCursor = 0;
   if (FAILED(m_pBuffer->GetCurrentPosition(&playCursor, &writeCursor))) // Get the current playback and safe write positions
   {
     CLog::Log(LOGERROR,__FUNCTION__ ": GetCurrentPosition failed. Unable to determine buffer status");
@@ -379,7 +379,7 @@
 
 void CWin32DirectSound::CheckPlayStatus()
 {
-  DWORD status = 0;
+  unsigned int status = 0;
   m_pBuffer->GetStatus(&status);
 
   if(!m_bPause && !(status & DSBSTATUS_PLAYING) && m_CacheLen > m_PreCacheSize) // If we have some data, see if we can start playback
@@ -389,7 +389,7 @@
   }
 }
 
-DWORD CWin32DirectSound::GetSpace()
+unsigned int CWin32DirectSound::GetSpace()
 {
   CSingleLock lock (m_critSection);
   UpdateCacheStatus();
@@ -398,29 +398,29 @@
 }
 
 //***********************************************************************************************
-FLOAT CWin32DirectSound::GetDelay()
+float CWin32DirectSound::GetDelay()
 {
   // Make sure we know how much data is in the cache
   UpdateCacheStatus();
 
   CSingleLock lock (m_critSection);
-  FLOAT delay  = 0.008f; // WTF?
-  delay += (FLOAT)m_CacheLen / (FLOAT)m_AvgBytesPerSec;
+  float delay  = 0.008f; // WTF?
+  delay += (float)m_CacheLen / (float)m_AvgBytesPerSec;
   return delay;
 }
 
 //***********************************************************************************************
-FLOAT CWin32DirectSound::GetCacheTime()
+float CWin32DirectSound::GetCacheTime()
 {
   CSingleLock lock (m_critSection);
   // Make sure we know how much data is in the cache
   UpdateCacheStatus();
 
-  return (FLOAT)m_CacheLen / (FLOAT)m_AvgBytesPerSec;
+  return (float)m_CacheLen / (float)m_AvgBytesPerSec;
 }
 
 //***********************************************************************************************
-DWORD CWin32DirectSound::GetChunkLen()
+unsigned int CWin32DirectSound::GetChunkLen()
 {
   return m_dwChunkSize;
 }
@@ -447,7 +447,7 @@
 void CWin32DirectSound::WaitCompletion()
 {
   CSingleLock lock (m_critSection);
-  DWORD status, timeout;
+  unsigned int status, timeout;
   unsigned char* silence;
 
   if (!m_pBuffer)
@@ -457,7 +457,7 @@
     return; // We weren't playing anyway
 
   // The drain should complete in the time occupied by the cache
-  timeout  = (DWORD)(1000 * GetDelay());
+  timeout  = (unsigned int)(1000 * GetDelay());
   timeout += timeGetTime();
   silence  = (unsigned char*)calloc(1,m_dwChunkSize); // Initialize 'silence' to zero...
 
@@ -492,7 +492,7 @@
   m_pBuffer->Stop();
 }
 
-void CWin32DirectSound::MapDataIntoBuffer(unsigned char* pData, DWORD len, unsigned char* pOut)
+void CWin32DirectSound::MapDataIntoBuffer(unsigned char* pData, unsigned int len, unsigned char* pOut)
 {
   // TODO: Add support for 8, 24, and 32-bit audio
   if (m_pChannelMap && !m_Passthrough && m_uiBitsPerSample == 16)
@@ -569,7 +569,7 @@
 {
   switch (err) 
   {
-    case DS_OK: return "DS_OK";
+    case Dtrue: return "Dtrue";
     case DS_NO_VIRTUALIZATION: return "DS_NO_VIRTUALIZATION";
     case DSERR_ALLOCATED: return "DS_NO_VIRTUALIZATION";
     case DSERR_CONTROLUNAVAIL: return "DSERR_CONTROLUNAVAIL";
Index: xbmc/cores/AudioRenderers/IAudioRenderer.h
===================================================================
--- xbmc/cores/AudioRenderers/IAudioRenderer.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/IAudioRenderer.h	(arbetskopia)
@@ -41,23 +41,23 @@
   virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec, bool bIsMusic, bool bPassthrough) = 0;
   virtual void UnRegisterAudioCallback() = 0;
   virtual void RegisterAudioCallback(IAudioCallback* pCallback) = 0;
-  virtual FLOAT GetDelay() = 0;
-  virtual FLOAT GetCacheTime() = 0;
+  virtual float GetDelay() = 0;
+  virtual float GetCacheTime() = 0;
 
-  virtual DWORD AddPackets(const void* data, DWORD len) = 0;
+  virtual unsigned int AddPackets(const void* data, unsigned int len) = 0;
   virtual bool IsResampling() { return false;};
-  virtual DWORD GetSpace() = 0;
-  virtual HRESULT Deinitialize() = 0;
-  virtual HRESULT Pause() = 0;
-  virtual HRESULT Stop() = 0;
-  virtual HRESULT Resume() = 0;
-  virtual DWORD GetChunkLen() = 0;
+  virtual unsigned int GetSpace() = 0;
+  virtual bool Deinitialize() = 0;
+  virtual bool Pause() = 0;
+  virtual bool Stop() = 0;
+  virtual bool Resume() = 0;
+  virtual unsigned int GetChunkLen() = 0;
 
-  virtual LONG GetMinimumVolume() const = 0;
-  virtual LONG GetMaximumVolume() const = 0;
-  virtual LONG GetCurrentVolume() const = 0;
+  virtual long GetMinimumVolume() const = 0;
+  virtual long GetMaximumVolume() const = 0;
+  virtual long GetCurrentVolume() const = 0;
   virtual void Mute(bool bMute) = 0;
-  virtual HRESULT SetCurrentVolume(LONG nVolume) = 0;
+  virtual bool SetCurrentVolume(long nVolume) = 0;
   virtual void SetDynamicRangeCompression(long drc) {};
   virtual int SetPlaySpeed(int iSpeed) = 0;
   virtual void WaitCompletion() = 0;
Index: xbmc/cores/AudioRenderers/CoreAudioRenderer.h
===================================================================
--- xbmc/cores/AudioRenderers/CoreAudioRenderer.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/CoreAudioRenderer.h	(arbetskopia)
@@ -103,22 +103,22 @@
   public:
     CCoreAudioRenderer();
     virtual ~CCoreAudioRenderer();
-    virtual DWORD GetChunkLen();
-    virtual FLOAT GetDelay();
+    virtual unsigned int GetChunkLen();
+    virtual float GetDelay();
     virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec = "", bool bIsMusic=false, bool bPassthrough = false);
-    virtual HRESULT Deinitialize();
-    virtual DWORD AddPackets(const void* data, DWORD len);
-    virtual DWORD GetSpace();
-    virtual FLOAT GetCacheTime();
-    virtual HRESULT Pause();
-    virtual HRESULT Stop();
-    virtual HRESULT Resume();
+    virtual bool Deinitialize();
+    virtual unsigned int AddPackets(const void* data, unsigned int len);
+    virtual unsigned int GetSpace();
+    virtual float GetCacheTime();
+    virtual bool Pause();
+    virtual bool Stop();
+    virtual bool Resume();
     
-    virtual LONG GetMinimumVolume() const;
-    virtual LONG GetMaximumVolume() const;
-    virtual LONG GetCurrentVolume() const;
+    virtual long GetMinimumVolume() const;
+    virtual long GetMaximumVolume() const;
+    virtual long GetCurrentVolume() const;
     virtual void Mute(bool bMute);
-    virtual HRESULT SetCurrentVolume(LONG nVolume);
+    virtual bool SetCurrentVolume(long nVolume);
     virtual void WaitCompletion();
 
     // Unimplemented IAudioRenderer methods
@@ -137,8 +137,8 @@
     bool m_Pause;
     bool m_Initialized; // Prevent multiple init/deinit
    
-    LONG m_CurrentVolume; // Courtesy of the jerk that made GetCurrentVolume a const...
-    DWORD m_ChunkLen; // Minimum amount of data accepted by AddPackets
+    long m_CurrentVolume; // Courtesy of the jerk that made GetCurrentVolume a const...
+    unsigned int m_ChunkLen; // Minimum amount of data accepted by AddPackets
     CSliceQueue* m_pCache;
     size_t m_MaxCacheLen; // Maximum number of bytes to be cached by the renderer.
         
Index: xbmc/cores/AudioRenderers/Win32DirectSound.h
===================================================================
--- xbmc/cores/AudioRenderers/Win32DirectSound.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/Win32DirectSound.h	(arbetskopia)
@@ -40,25 +40,25 @@
 public:
   virtual void UnRegisterAudioCallback();
   virtual void RegisterAudioCallback(IAudioCallback* pCallback);
-  virtual DWORD GetChunkLen();
-  virtual FLOAT GetDelay();
-  virtual FLOAT GetCacheTime();
+  virtual unsigned int GetChunkLen();
+  virtual float GetDelay();
+  virtual float GetCacheTime();
   CWin32DirectSound();
   virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec = "", bool bIsMusic=false, bool bAudioPassthrough=false);
   virtual ~CWin32DirectSound();
 
-  virtual DWORD AddPackets(const void* data, DWORD len);
-  virtual DWORD GetSpace();
-  virtual HRESULT Deinitialize();
-  virtual HRESULT Pause();
-  virtual HRESULT Stop();
-  virtual HRESULT Resume();
+  virtual unsigned int AddPackets(const void* data, unsigned int len);
+  virtual unsigned int GetSpace();
+  virtual bool Deinitialize();
+  virtual bool Pause();
+  virtual bool Stop();
+  virtual bool Resume();
 
-  virtual LONG GetMinimumVolume() const;
-  virtual LONG GetMaximumVolume() const;
-  virtual LONG GetCurrentVolume() const;
+  virtual long GetMinimumVolume() const;
+  virtual long GetMaximumVolume() const;
+  virtual long GetCurrentVolume() const;
   virtual void Mute(bool bMute);
-  virtual HRESULT SetCurrentVolume(LONG nVolume);
+  virtual bool SetCurrentVolume(long nVolume);
   virtual int SetPlaySpeed(int iSpeed);
   virtual void WaitCompletion();
   virtual void SwitchChannels(int iAudioStream, bool bAudioOnAllSpeakers);
@@ -66,7 +66,7 @@
 private:
   void UpdateCacheStatus();
   void CheckPlayStatus();
-  void MapDataIntoBuffer(unsigned char* pData, DWORD len, unsigned char* pOut);
+  void MapDataIntoBuffer(unsigned char* pData, unsigned int len, unsigned char* pOut);
   unsigned char* GetChannelMap(unsigned int channels, const char* strAudioCodec);
 
   LPDIRECTSOUNDBUFFER  m_pBuffer;
@@ -74,9 +74,9 @@
 
   IAudioCallback* m_pCallback;
 
-  LONG m_nCurrentVolume;
-  DWORD m_dwChunkSize;
-  DWORD m_dwBufferLen;
+  long m_nCurrentVolume;
+  unsigned int m_dwChunkSize;
+  unsigned int m_dwBufferLen;
   bool m_bPause;
   bool m_bIsAllocated;
 
Index: xbmc/cores/AudioRenderers/PulseAudioDirectSound.cpp
===================================================================
--- xbmc/cores/AudioRenderers/PulseAudioDirectSound.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/PulseAudioDirectSound.cpp	(arbetskopia)
@@ -313,7 +313,7 @@
   Deinitialize();
 }
 
-HRESULT CPulseAudioDirectSound::Deinitialize()
+bool CPulseAudioDirectSound::Deinitialize()
 {
   m_bIsAllocated = false;
   if (m_Context)
@@ -346,7 +346,7 @@
   }
 
   g_audioContext.SetActiveDevice(CAudioContext::DEFAULT_DEVICE);
-  return S_OK;
+  return true;
 }
 
 inline bool CPulseAudioDirectSound::WaitForOperation(pa_operation *op, const char *LogEntry = "")
@@ -391,30 +391,30 @@
   return cork;
 }
 
-HRESULT CPulseAudioDirectSound::Pause()
+bool CPulseAudioDirectSound::Pause()
 {
   if (!m_bIsAllocated)
     return -1;
 
   if (m_bPause) 
-    return S_OK;
+    return true;
 
   m_bPause = Cork(true);
 
-  return m_bPause ? S_OK : E_FAIL;
+  return m_bPause;
 }
 
-HRESULT CPulseAudioDirectSound::Resume()
+bool CPulseAudioDirectSound::Resume()
 {
   if (!m_bIsAllocated)
      return -1;
   if(m_bPause)
     m_bPause = Cork(false);
 
-  return m_bPause == false ? S_OK : E_FAIL;
+  return !m_bPause;
 }
 
-HRESULT CPulseAudioDirectSound::Stop()
+bool CPulseAudioDirectSound::Stop()
 {
   if (!m_bIsAllocated)
     return -1;
@@ -423,20 +423,20 @@
 
   m_bPause = false;
 
-  return S_OK;
+  return true;
 }
 
-LONG CPulseAudioDirectSound::GetMinimumVolume() const
+long CPulseAudioDirectSound::GetMinimumVolume() const
 {
   return -6000;
 }
 
-LONG CPulseAudioDirectSound::GetMaximumVolume() const
+long CPulseAudioDirectSound::GetMaximumVolume() const
 {
   return 0;
 }
 
-LONG CPulseAudioDirectSound::GetCurrentVolume() const
+long CPulseAudioDirectSound::GetCurrentVolume() const
 {
   return m_nCurrentVolume;
 }
@@ -452,7 +452,7 @@
     SetCurrentVolume(m_nCurrentVolume);
 }
 
-HRESULT CPulseAudioDirectSound::SetCurrentVolume(LONG nVolume)
+bool CPulseAudioDirectSound::SetCurrentVolume(long nVolume)
 {
   if (!m_bIsAllocated || m_bPassthrough)
     return -1;
@@ -471,10 +471,10 @@
 
   pa_threaded_mainloop_unlock(m_MainLoop);
 
-  return S_OK;
+  return true;
 }
 
-DWORD CPulseAudioDirectSound::GetSpace()
+unsigned int CPulseAudioDirectSound::GetSpace()
 {
   if (!m_bIsAllocated)
     return 0;
@@ -486,7 +486,7 @@
   return l;
 }
 
-DWORD CPulseAudioDirectSound::AddPackets(const void* data, DWORD len)
+unsigned int CPulseAudioDirectSound::AddPackets(const void* data, unsigned int len)
 {
   if (!m_bIsAllocated)
     return len;
@@ -500,12 +500,12 @@
   return length - rtn;
 }
 
-FLOAT CPulseAudioDirectSound::GetCacheTime()
+float CPulseAudioDirectSound::GetCacheTime()
 {
   return (float)(m_uiBufferSize - GetSpace()) / (float)m_uiBytesPerSecond;
 }
 
-FLOAT CPulseAudioDirectSound::GetDelay()
+float CPulseAudioDirectSound::GetDelay()
 {
   if (!m_bIsAllocated)
     return 0;
@@ -526,7 +526,7 @@
   return latency / 1000000.0;
 }
 
-DWORD CPulseAudioDirectSound::GetChunkLen()
+unsigned int CPulseAudioDirectSound::GetChunkLen()
 {
   return m_dwPacketSize;
 }
Index: xbmc/cores/AudioRenderers/NullDirectSound.cpp
===================================================================
--- xbmc/cores/AudioRenderers/NullDirectSound.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/NullDirectSound.cpp	(arbetskopia)
@@ -66,10 +66,10 @@
 
 
 //***********************************************************************************************
-HRESULT CNullDirectSound::Deinitialize()
+bool CNullDirectSound::Deinitialize()
 {
   g_audioContext.SetActiveDevice(CAudioContext::DEFAULT_DEVICE);
-  return S_OK;
+  return true;
 }
 
 void CNullDirectSound::Flush()
@@ -79,39 +79,39 @@
 }
 
 //***********************************************************************************************
-HRESULT CNullDirectSound::Pause()
+bool CNullDirectSound::Pause()
 {
   m_paused = true;
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CNullDirectSound::Resume()
+bool CNullDirectSound::Resume()
 {
   m_paused = false;
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CNullDirectSound::Stop()
+bool CNullDirectSound::Stop()
 {
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-LONG CNullDirectSound::GetMinimumVolume() const
+long CNullDirectSound::GetMinimumVolume() const
 {
   return -60;
 }
 
 //***********************************************************************************************
-LONG CNullDirectSound::GetMaximumVolume() const
+long CNullDirectSound::GetMaximumVolume() const
 {
   return 60;
 }
 
 //***********************************************************************************************
-LONG CNullDirectSound::GetCurrentVolume() const
+long CNullDirectSound::GetCurrentVolume() const
 {
   return m_nCurrentVolume;
 }
@@ -122,15 +122,15 @@
 }
 
 //***********************************************************************************************
-HRESULT CNullDirectSound::SetCurrentVolume(LONG nVolume)
+bool CNullDirectSound::SetCurrentVolume(long nVolume)
 {
   m_nCurrentVolume = nVolume;
-  return S_OK;
+  return true;
 }
 
 
 //***********************************************************************************************
-DWORD CNullDirectSound::GetSpace()
+unsigned int CNullDirectSound::GetSpace()
 {
   Update();
 
@@ -141,7 +141,7 @@
 }
 
 //***********************************************************************************************
-DWORD CNullDirectSound::AddPackets(const void* data, DWORD len)
+unsigned int CNullDirectSound::AddPackets(const void* data, unsigned int len)
 {
   if (m_paused || GetSpace() == 0)
     return 0;
@@ -153,20 +153,20 @@
 }
 
 //***********************************************************************************************
-FLOAT CNullDirectSound::GetDelay()
+float CNullDirectSound::GetDelay()
 {
   Update();
 
   return m_timePerPacket * (float)m_packetsSent;
 }
 
-FLOAT CNullDirectSound::GetCacheTime()
+float CNullDirectSound::GetCacheTime()
 {
   return GetDelay();
 }
 
 //***********************************************************************************************
-DWORD CNullDirectSound::GetChunkLen()
+unsigned int CNullDirectSound::GetChunkLen()
 {
   return (int)CHUNKLEN;
 }
Index: xbmc/cores/AudioRenderers/AudioRendererFactory.cpp
===================================================================
--- xbmc/cores/AudioRenderers/AudioRendererFactory.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/AudioRendererFactory.cpp	(arbetskopia)
@@ -63,7 +63,7 @@
 #ifdef HAS_PULSEAUDIO
   audioSink = new CPulseAudioDirectSound();
   ReturnOnValidInitialize();
-#endif
+#endif*/
 
 /* incase none in the first pass was able to be created, fall back to os specific */
 
Index: xbmc/cores/AudioRenderers/PulseAudioDirectSound.h
===================================================================
--- xbmc/cores/AudioRenderers/PulseAudioDirectSound.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/PulseAudioDirectSound.h	(arbetskopia)
@@ -42,25 +42,25 @@
 public:
   virtual void UnRegisterAudioCallback();
   virtual void RegisterAudioCallback(IAudioCallback* pCallback);
-  virtual DWORD GetChunkLen();
-  virtual FLOAT GetDelay();
-  virtual FLOAT GetCacheTime();
+  virtual unsigned int GetChunkLen();
+  virtual float GetDelay();
+  virtual float GetCacheTime();
   CPulseAudioDirectSound();
   virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec = "", bool bIsMusic=false, bool bPassthrough = false);
   virtual ~CPulseAudioDirectSound();
 
-  virtual DWORD AddPackets(const void* data, DWORD len);
-  virtual DWORD GetSpace();
-  virtual HRESULT Deinitialize();
-  virtual HRESULT Pause();
-  virtual HRESULT Stop();
-  virtual HRESULT Resume();
+  virtual unsigned int AddPackets(const void* data, unsigned int len);
+  virtual unsigned int GetSpace();
+  virtual bool Deinitialize();
+  virtual bool Pause();
+  virtual bool Stop();
+  virtual bool Resume();
 
-  virtual LONG GetMinimumVolume() const;
-  virtual LONG GetMaximumVolume() const;
-  virtual LONG GetCurrentVolume() const;
+  virtual long GetMinimumVolume() const;
+  virtual long GetMaximumVolume() const;
+  virtual long GetCurrentVolume() const;
   virtual void Mute(bool bMute);
-  virtual HRESULT SetCurrentVolume(LONG nVolume);
+  virtual bool SetCurrentVolume(long nVolume);
   virtual int SetPlaySpeed(int iSpeed);
   virtual void WaitCompletion();
   virtual void SwitchChannels(int iAudioStream, bool bAudioOnAllSpeakers);
@@ -72,9 +72,9 @@
 
   IAudioCallback* m_pCallback;
 
-  LONG m_nCurrentVolume;
-  DWORD m_dwPacketSize;
-  DWORD m_dwNumPackets;
+  long m_nCurrentVolume;
+  unsigned int m_dwPacketSize;
+  unsigned int m_dwNumPackets;
   
   bool m_bIsAllocated;
 
Index: xbmc/cores/AudioRenderers/NullDirectSound.h
===================================================================
--- xbmc/cores/AudioRenderers/NullDirectSound.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/NullDirectSound.h	(arbetskopia)
@@ -37,25 +37,25 @@
 public:
   virtual void UnRegisterAudioCallback();
   virtual void RegisterAudioCallback(IAudioCallback* pCallback);
-  virtual DWORD GetChunkLen();
-  virtual FLOAT GetDelay();
-  virtual FLOAT GetCacheTime();
+  virtual unsigned int GetChunkLen();
+  virtual float GetDelay();
+  virtual float GetCacheTime();
   CNullDirectSound();
   virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec = "", bool bIsMusic=false, bool bPassthrough = false);
   virtual ~CNullDirectSound();
 
-  virtual DWORD AddPackets(const void* data, DWORD len);
-  virtual DWORD GetSpace();
-  virtual HRESULT Deinitialize();
-  virtual HRESULT Pause();
-  virtual HRESULT Stop();
-  virtual HRESULT Resume();
+  virtual unsigned int AddPackets(const void* data, unsigned int len);
+  virtual unsigned int GetSpace();
+  virtual bool Deinitialize();
+  virtual bool Pause();
+  virtual bool Stop();
+  virtual bool Resume();
 
-  virtual LONG GetMinimumVolume() const;
-  virtual LONG GetMaximumVolume() const;
-  virtual LONG GetCurrentVolume() const;
+  virtual long GetMinimumVolume() const;
+  virtual long GetMaximumVolume() const;
+  virtual long GetCurrentVolume() const;
   virtual void Mute(bool bMute);
-  virtual HRESULT SetCurrentVolume(LONG nVolume);
+  virtual bool SetCurrentVolume(long nVolume);
   virtual int SetPlaySpeed(int iSpeed);
   virtual void WaitCompletion();
   virtual void DoWork();
@@ -63,7 +63,7 @@
 
   virtual void Flush();
 private:
-  LONG m_nCurrentVolume;
+  long m_nCurrentVolume;
 
   float m_timePerPacket;
   int m_packetsSent;
Index: xbmc/cores/AudioRenderers/ALSADirectSound.cpp
===================================================================
--- xbmc/cores/AudioRenderers/ALSADirectSound.cpp	(revision 21038)
+++ xbmc/cores/AudioRenderers/ALSADirectSound.cpp	(arbetskopia)
@@ -298,7 +298,7 @@
 
 
 //***********************************************************************************************
-HRESULT CALSADirectSound::Deinitialize()
+bool CALSADirectSound::Deinitialize()
 {
   m_bIsAllocated = false;
   if (m_pPlayHandle)
@@ -309,7 +309,7 @@
 
   m_pPlayHandle=NULL;
   g_audioContext.SetActiveDevice(CAudioContext::DEFAULT_DEVICE);
-  return S_OK;
+  return true;
 }
 
 void CALSADirectSound::Flush() {
@@ -323,12 +323,12 @@
 }
 
 //***********************************************************************************************
-HRESULT CALSADirectSound::Pause()
+bool CALSADirectSound::Pause()
 {
   if (!m_bIsAllocated)
      return -1;
 
-  if (m_bPause) return S_OK;
+  if (m_bPause) return true;
   m_bPause = true;
 
   if(m_bCanPause)
@@ -345,11 +345,11 @@
     Flush();
   }
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CALSADirectSound::Resume()
+bool CALSADirectSound::Resume()
 {
   if (!m_bIsAllocated)
      return -1;
@@ -359,11 +359,11 @@
 
   m_bPause = false;
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-HRESULT CALSADirectSound::Stop()
+bool CALSADirectSound::Stop()
 {
   if (!m_bIsAllocated)
      return -1;
@@ -372,23 +372,23 @@
 
   m_bPause = false;
 
-  return S_OK;
+  return true;
 }
 
 //***********************************************************************************************
-LONG CALSADirectSound::GetMinimumVolume() const
+long CALSADirectSound::GetMinimumVolume() const
 {
   return -60;
 }
 
 //***********************************************************************************************
-LONG CALSADirectSound::GetMaximumVolume() const
+long CALSADirectSound::GetMaximumVolume() const
 {
   return 60;
 }
 
 //***********************************************************************************************
-LONG CALSADirectSound::GetCurrentVolume() const
+long CALSADirectSound::GetCurrentVolume() const
 {
   return m_nCurrentVolume;
 }
@@ -407,17 +407,17 @@
 }
 
 //***********************************************************************************************
-HRESULT CALSADirectSound::SetCurrentVolume(LONG nVolume)
+bool CALSADirectSound::SetCurrentVolume(long nVolume)
 {
   if (!m_bIsAllocated || m_bPassthrough) return -1;
   m_nCurrentVolume = nVolume;
   m_amp.SetVolume(nVolume);
-  return S_OK;
+  return true;
 }
 
 
 //***********************************************************************************************
-DWORD CALSADirectSound::GetSpace()
+unsigned int CALSADirectSound::GetSpace()
 {
   if (!m_bIsAllocated) return 0;
 
@@ -440,7 +440,7 @@
 }
 
 //***********************************************************************************************
-DWORD CALSADirectSound::AddPackets(const void* data, DWORD len)
+unsigned int CALSADirectSound::AddPackets(const void* data, unsigned int len)
 {
   if (!m_bIsAllocated) {
     CLog::Log(LOGERROR,"CALSADirectSound::AddPackets - sanity failed. no valid play handle!");
@@ -486,7 +486,7 @@
 }
 
 //***********************************************************************************************
-FLOAT CALSADirectSound::GetDelay()
+float CALSADirectSound::GetDelay()
 {
   if (!m_bIsAllocated) 
     return 0.0;
@@ -510,13 +510,13 @@
   return (double)frames / m_uiSamplesPerSec;
 }
 
-FLOAT CALSADirectSound::GetCacheTime()
+float CALSADirectSound::GetCacheTime()
 {
   return (float)(m_uiBufferSize - GetSpace()) / (float)m_uiBytesPerSecond;
 }
 
 //***********************************************************************************************
-DWORD CALSADirectSound::GetChunkLen()
+unsigned int CALSADirectSound::GetChunkLen()
 {
   return m_dwPacketSize;
 }
Index: xbmc/cores/AudioRenderers/ALSADirectSound.h
===================================================================
--- xbmc/cores/AudioRenderers/ALSADirectSound.h	(revision 21038)
+++ xbmc/cores/AudioRenderers/ALSADirectSound.h	(arbetskopia)
@@ -46,25 +46,25 @@
 public:
   virtual void UnRegisterAudioCallback();
   virtual void RegisterAudioCallback(IAudioCallback* pCallback);
-  virtual DWORD GetChunkLen();
-  virtual FLOAT GetDelay();
-  virtual FLOAT GetCacheTime();
+  virtual unsigned int GetChunkLen();
+  virtual float GetDelay();
+  virtual float GetCacheTime();
   CALSADirectSound();
   virtual bool Initialize(IAudioCallback* pCallback, int iChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, const char* strAudioCodec = "", bool bIsMusic=false, bool bPassthrough = false);
   virtual ~CALSADirectSound();
 
-  virtual DWORD AddPackets(const void* data, DWORD len);
-  virtual DWORD GetSpace();
-  virtual HRESULT Deinitialize();
-  virtual HRESULT Pause();
-  virtual HRESULT Stop();
-  virtual HRESULT Resume();
+  virtual unsigned int AddPackets(const void* data, unsigned int len);
+  virtual unsigned int GetSpace();
+  virtual bool Deinitialize();
+  virtual bool Pause();
+  virtual bool Stop();
+  virtual bool Resume();
 
-  virtual LONG GetMinimumVolume() const;
-  virtual LONG GetMaximumVolume() const;
-  virtual LONG GetCurrentVolume() const;
+  virtual long GetMinimumVolume() const;
+  virtual long GetMaximumVolume() const;
+  virtual long GetCurrentVolume() const;
   virtual void Mute(bool bMute);
-  virtual HRESULT SetCurrentVolume(LONG nVolume);
+  virtual bool SetCurrentVolume(long nVolume);
   virtual int SetPlaySpeed(int iSpeed);
   virtual void WaitCompletion();
   virtual void SwitchChannels(int iAudioStream, bool bAudioOnAllSpeakers);
@@ -77,7 +77,7 @@
   IAudioCallback* m_pCallback;
 
   CPCMAmplifier 	m_amp;
-  LONG m_nCurrentVolume;
+  long m_nCurrentVolume;
   snd_pcm_uframes_t m_dwPacketSize;
   unsigned int      m_dwNumPackets;
   bool m_bPause;