Skip to content
This repository
Browse code

Merge pull request #3274 from FernetMenta/aefixes

ActiveAE: small fixes
  • Loading branch information...
commit b23fae68df85b4b9d7f1eebc76103a251b2a6814 2 parents 17c4474 + ea6c0e2
Peter Frühberger authored September 16, 2013
1  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -422,7 +422,6 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
422 422
         case CActiveAEControlProtocol::PAUSESTREAM:
423 423
           CActiveAEStream *stream;
424 424
           stream = *(CActiveAEStream**)msg->data;
425  
-          stream->m_paused = true;
426 425
           if (stream->m_paused != true && m_streams.size() == 1)
427 426
             FlushEngine();
428 427
           stream->m_paused = true;
5  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -90,7 +90,7 @@ unsigned int CActiveAEStream::AddData(void *data, unsigned int size)
90 90
 {
91 91
   Message *msg;
92 92
   unsigned int copied = 0;
93  
-  int bytesToCopy = size;
  93
+  unsigned int bytesToCopy = size;
94 94
   uint8_t *buf = (uint8_t*)data;
95 95
 
96 96
   while(copied < size)
@@ -142,7 +142,8 @@ unsigned int CActiveAEStream::AddData(void *data, unsigned int size)
142 142
         m_currentBuffer->pkt->nb_samples += samples;
143 143
         m_bufferedTime += (double)samples / m_currentBuffer->pkt->config.sample_rate;
144 144
       }
145  
-      copied += bytes;
  145
+      if (buf != m_leftoverBuffer)
  146
+        copied += bytes;
146 147
       if (m_currentBuffer->pkt->nb_samples == m_currentBuffer->pkt->max_nb_samples)
147 148
       {
148 149
         MsgStreamSample msgData;

0 notes on commit b23fae6

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