From 801bf25f45bcba8f9d94db62974b757a731a11b1 Mon Sep 17 00:00:00 2001 From: spiff Date: Thu, 10 May 2012 16:40:29 +0200 Subject: [AE] make the subset of AE implemented in PulseAE work again. this is just a bandaid --- xbmc/cores/AudioEngine/Engines/PulseAE.cpp | 2 +- xbmc/cores/AudioEngine/Engines/PulseAE.h | 6 +++++- xbmc/cores/AudioEngine/Engines/PulseAEStream.cpp | 3 ++- xbmc/cores/AudioEngine/Engines/PulseAEStream.h | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE.cpp b/xbmc/cores/AudioEngine/Engines/PulseAE.cpp index e838d70583..a4b9ab9b0e 100644 --- a/xbmc/cores/AudioEngine/Engines/PulseAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/PulseAE.cpp @@ -163,7 +163,7 @@ void CPulseAE::SetVolume(float volume) (*itt)->UpdateVolume(volume); } -IAEStream *CPulseAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, CAEChannelInfo channelLayout, unsigned int options) +IAEStream *CPulseAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate,CAEChannelInfo channelLayout, unsigned int options) { CPulseAEStream *st = new CPulseAEStream(m_Context, m_MainLoop, dataFormat, sampleRate, channelLayout, options); diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE.h b/xbmc/cores/AudioEngine/Engines/PulseAE.h index 36a87c7ad4..3895ddee16 100644 --- a/xbmc/cores/AudioEngine/Engines/PulseAE.h +++ b/xbmc/cores/AudioEngine/Engines/PulseAE.h @@ -50,7 +50,7 @@ public: virtual void SetVolume(float volume); /* returns a new stream for data in the specified format */ - virtual IAEStream *MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, CAEChannelInfo channelLayout, unsigned int options = 0); + virtual IAEStream *MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate, CAEChannelInfo channelLayout, unsigned int options = 0); virtual IAEStream *FreeStream(IAEStream *stream); void RemoveStream(IAEStream *stream); @@ -61,6 +61,10 @@ public: /* free's sounds that have expired */ virtual void GarbageCollect(); + virtual void SetMute(const bool enabled) {} + virtual bool IsMuted() { return false; } + virtual void SetSoundMode(const int mode) {} + virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); private: CCriticalSection m_lock; diff --git a/xbmc/cores/AudioEngine/Engines/PulseAEStream.cpp b/xbmc/cores/AudioEngine/Engines/PulseAEStream.cpp index 9f55130100..169fb54d8b 100644 --- a/xbmc/cores/AudioEngine/Engines/PulseAEStream.cpp +++ b/xbmc/cores/AudioEngine/Engines/PulseAEStream.cpp @@ -129,6 +129,7 @@ CPulseAEStream::CPulseAEStream(pa_context *context, pa_threaded_mainloop *mainLo case AE_CH_TBL : map.map[ch] = PA_CHANNEL_POSITION_TOP_REAR_LEFT ; break; case AE_CH_TBR : map.map[ch] = PA_CHANNEL_POSITION_TOP_REAR_RIGHT ; break; case AE_CH_TBC : map.map[ch] = PA_CHANNEL_POSITION_TOP_REAR_CENTER ; break; + default: break; } m_MaxVolume = CAEFactory::AE->GetVolume(); @@ -546,7 +547,7 @@ void CPulseAEStream::RegisterSlave(IAEStream *stream) m_slave = stream; } -CPulseAEStream::CLinearFader::CLinearFader(IAEStream *stream) : m_stream(stream) +CPulseAEStream::CLinearFader::CLinearFader(IAEStream *stream) : CThread("AE Stream"), m_stream(stream) { m_from = 0; m_target = 0; diff --git a/xbmc/cores/AudioEngine/Engines/PulseAEStream.h b/xbmc/cores/AudioEngine/Engines/PulseAEStream.h index 3156c0a328..eb7fde409e 100644 --- a/xbmc/cores/AudioEngine/Engines/PulseAEStream.h +++ b/xbmc/cores/AudioEngine/Engines/PulseAEStream.h @@ -44,6 +44,7 @@ public: virtual bool IsPaused (); virtual bool IsDraining (); virtual bool IsDestroyed (); + virtual bool IsBuffering() { return false; } virtual void Pause (); virtual void Resume (); @@ -59,6 +60,7 @@ public: virtual const unsigned int GetChannelCount() const; virtual const unsigned int GetSampleRate () const; virtual const enum AEDataFormat GetDataFormat () const; + virtual const unsigned int GetEncodedSampleRate() const { return GetSampleRate(); } /* for dynamic sample rate changes (smoothvideo) */ virtual double GetResampleRatio(); -- cgit v1.2.3