player: don't play empty chunks
An empty chunk may happen when it only contains a tag, but no PCM data. Don't call playAudio() then.
This commit is contained in:
@@ -236,6 +236,9 @@ playChunk(struct song *song, struct music_chunk *chunk,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chunk->length == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pcm_volume(chunk->data, chunk->length,
|
pcm_volume(chunk->data, chunk->length,
|
||||||
format, pc.softwareVolume);
|
format, pc.softwareVolume);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user