Diff of /branches/AudioEngine/xbmc/cores/AudioEngine/Engines/PulseAE.cpp [r35732] .. [r35733] Maximize Restore

  Switch to side-by-side view

--- a/branches/AudioEngine/xbmc/cores/AudioEngine/Engines/PulseAE.cpp
+++ b/branches/AudioEngine/xbmc/cores/AudioEngine/Engines/PulseAE.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "system.h"
 #ifdef HAS_PULSEAUDIO
 
 #include "PulseAE.h"
@@ -168,6 +169,15 @@
   return st;
 }
 
+IAEStream *CPulseAE::AlterStream(IAEStream *stream, enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int channelCount, AEChLayout channelLayout, unsigned int options)
+{
+  /* FIXME: Pulse can alter a stream I think */
+  ((CPulseAEStream*)stream)->SetFreeOnDrain();
+  stream->Drain();
+
+  return GetStream(dataFormat, sampleRate, channelCount, channelLayout, options);
+}
+
 IAESound *CPulseAE::GetSound(CStdString file)
 {
   printf("GetSound %s\n", file.c_str());