Fix decoder so it ends properly on non-looped files when Repeat One is enabled.
parent
6661605ea0
commit
211773c714
|
@ -61,7 +61,9 @@
|
||||||
{
|
{
|
||||||
BOOL repeatone = IsRepeatOneSet();
|
BOOL repeatone = IsRepeatOneSet();
|
||||||
|
|
||||||
if (!repeatone) {
|
BOOL loopokay = repeatone && stream->loop_flag;
|
||||||
|
|
||||||
|
if (!loopokay) {
|
||||||
if (framesRead >= totalFrames) return 0;
|
if (framesRead >= totalFrames) return 0;
|
||||||
else if (framesRead + frames > totalFrames)
|
else if (framesRead + frames > totalFrames)
|
||||||
frames = (UInt32)(totalFrames - framesRead);
|
frames = (UInt32)(totalFrames - framesRead);
|
||||||
|
|
Loading…
Reference in New Issue