don't play unlooped tracks forever

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@141 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
halleyscometsw 2008-05-17 01:19:17 +00:00
parent 37f70ab663
commit a4abbd0ec9

View File

@ -352,7 +352,7 @@ DWORD WINAPI __stdcall decode(void *arg) {
int samples_to_do;
int l;
if (decode_pos_samples+576>stream_length_samples && !loop_forever)
if (decode_pos_samples+576>stream_length_samples && (!loop_forever || !vgmstream->loop_flag))
samples_to_do=stream_length_samples-decode_pos_samples;
else
samples_to_do=576;