Skip to content
This repository
Browse code

fixed, allow SotfAE commanded suspend/resume for all but restrict aut…

…o suspend/resume to windows
  • Loading branch information...
commit 174380d528a681302a0b9f2068d948dcd99403c4 1 parent ba2ca55
authored January 22, 2013
12  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -935,11 +935,7 @@ double CSoftAE::GetCacheTotal()
935 935
 
936 936
 bool CSoftAE::IsSuspended()
937 937
 {
938  
-#if defined(TARGET_WINDOWS)
939 938
   return m_isSuspended;
940  
-#else
941  
-  return false;
942  
-#endif
943 939
 }
944 940
 
945 941
 float CSoftAE::GetVolume()
@@ -972,7 +968,6 @@ void CSoftAE::StopAllSounds()
972 968
 bool CSoftAE::Suspend()
973 969
 {
974 970
   CLog::Log(LOGDEBUG, "CSoftAE::Suspend - Suspending AE processing");
975  
-#if defined(TARGET_WINDOWS)
976 971
   m_isSuspended = true;
977 972
   CSingleLock streamLock(m_streamLock);
978 973
   
@@ -981,7 +976,6 @@ bool CSoftAE::Suspend()
981 976
     CSoftAEStream *stream = *itt;
982 977
     stream->Flush();
983 978
   }
984  
-#endif
985 979
 
986 980
   return true;
987 981
 }
@@ -989,10 +983,8 @@ bool CSoftAE::Suspend()
989 983
 bool CSoftAE::Resume()
990 984
 {
991 985
   CLog::Log(LOGDEBUG, "CSoftAE::Resume - Resuming AE processing");
992  
-#if defined(TARGET_WINDOWS)
993 986
   m_isSuspended = false;
994 987
   m_reOpen = true;
995  
-#endif
996 988
 
997 989
   return true;
998 990
 }
@@ -1028,10 +1020,8 @@ void CSoftAE::Run()
1028 1020
         restart = true;
1029 1021
     }
1030 1022
 
1031  
-#if defined(TARGET_WINDOWS)
1032 1023
     /* Handle idle or forced suspend */
1033 1024
     ProcessSuspend();
1034  
-#endif
1035 1025
 
1036 1026
     /* if we are told to restart */
1037 1027
     if (m_reOpen || restart || !m_sink)
@@ -1408,6 +1398,7 @@ inline void CSoftAE::ProcessSuspend()
1408 1398
   bool sinkIsSuspended = false;
1409 1399
   unsigned int curSystemClock = 0;
1410 1400
 
  1401
+#if defined(TARGET_WINDOWS)
1411 1402
   if (!m_softSuspend && m_playingStreams.empty() && m_playing_sounds.empty() &&
1412 1403
       !g_advancedSettings.m_streamSilence)
1413 1404
   {
@@ -1418,6 +1409,7 @@ inline void CSoftAE::ProcessSuspend()
1418 1409
 
1419 1410
   if (m_softSuspend)
1420 1411
     curSystemClock = XbmcThreads::SystemClockMillis();
  1412
+#endif
1421 1413
 
1422 1414
   /* idle while in Suspend() state until Resume() called */
1423 1415
   /* idle if nothing to play and user hasn't enabled     */

0 notes on commit 174380d

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