Remove useless computation. After the pthread_cond_wait loop there are at least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
This commit is contained in:
parent
c584d6b087
commit
25c04a97d3
|
@ -330,8 +330,6 @@ osx_play(void *data, const char *playChunk, size_t size)
|
|||
pthread_cond_wait(&od->condition, &od->mutex);
|
||||
}
|
||||
|
||||
bytesToCopy = od->bufferSize - od->len;
|
||||
bytesToCopy = bytesToCopy < size ? bytesToCopy : size;
|
||||
size -= bytesToCopy;
|
||||
od->len += bytesToCopy;
|
||||
|
||||
|
|
Loading…
Reference in New Issue