Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3274 from FernetMenta/aefixes

ActiveAE: small fixes
  • Loading branch information...
commit b23fae68df85b4b9d7f1eebc76103a251b2a6814 2 parents 17c4474 + ea6c0e2
@fritsch fritsch authored
View
1  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -422,7 +422,6 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
case CActiveAEControlProtocol::PAUSESTREAM:
CActiveAEStream *stream;
stream = *(CActiveAEStream**)msg->data;
- stream->m_paused = true;
if (stream->m_paused != true && m_streams.size() == 1)
FlushEngine();
stream->m_paused = true;
View
5 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -90,7 +90,7 @@ unsigned int CActiveAEStream::AddData(void *data, unsigned int size)
{
Message *msg;
unsigned int copied = 0;
- int bytesToCopy = size;
+ unsigned int bytesToCopy = size;
uint8_t *buf = (uint8_t*)data;
while(copied < size)
@@ -142,7 +142,8 @@ unsigned int CActiveAEStream::AddData(void *data, unsigned int size)
m_currentBuffer->pkt->nb_samples += samples;
m_bufferedTime += (double)samples / m_currentBuffer->pkt->config.sample_rate;
}
- copied += bytes;
+ if (buf != m_leftoverBuffer)
+ copied += bytes;
if (m_currentBuffer->pkt->nb_samples == m_currentBuffer->pkt->max_nb_samples)
{
MsgStreamSample msgData;
Please sign in to comment.
Something went wrong with that request. Please try again.