1
0
Fork 0

Simplify conditional logic

This commit is contained in:
krcroft 2020-03-05 14:32:06 -08:00 committed by Patryk Obara
parent 0227fae934
commit 51284a6d42

View file

@ -294,9 +294,11 @@ static uint32_t opus_read(Sound_Sample * sample, void * buffer, uint32_t request
if (result == 0) {
sample->flags |= SOUND_SAMPLEFLAG_EOF;
break;
} else if (result == OP_HOLE) {
}
if (result == OP_HOLE)
continue; // hole in the data; keeping going!
} else if (result < 0) {
if (result < 0) {
sample->flags |= SOUND_SAMPLEFLAG_ERROR;
break;
}