Don't block a null enqueue if already empty.

This commit is contained in:
Unknown W. Brackets committed 2013-09-05 00:57:53 -07:00
1 parent 19c4c20f46
commit 3ff6bc6060
1 file changed
+1 -1
+1 -1
View File
@@ -155,7 +155,7 @@ u32 __AudioEnqueue(AudioChannel &chan, int chanNum, bool blocking) {
// If there's anything on the queue at all, it should be busy, but we try to be a bit lax.
//if (chan.sampleQueue.size() > chan.sampleCount * 2 * chanQueueMaxSizeFactor || chan.sampleAddress == 0) {
if (chan.sampleQueue.size() > 0 || chan.sampleAddress == 0) {
if (chan.sampleQueue.size() > 0) {
if (blocking) {
// TODO: Regular multichannel audio seems to block for 64 samples less? Or enqueue the first 64 sync?
int blockSamples = (int)chan.sampleQueue.size() / 2 / chanQueueMinSizeFactor;