Backport infinite loop fix from branch.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@305 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2005-09-24 13:38:18 +00:00
parent 31c99f9fc1
commit 5ca09c5cdb
1 changed files with 7 additions and 1 deletions

View File

@ -303,6 +303,7 @@ BOOL cdAudio_OpenTrack(char* filename) {
}
music_file_format = WZ_MP3;
return TRUE;
}
#endif
@ -330,10 +331,11 @@ BOOL cdAudio_OpenTrack(char* filename) {
}
music_file_format = WZ_OGG;
return TRUE;
}
#endif
return TRUE;
return FALSE; // unhandled
}
BOOL cdAudio_CloseTrack() {
@ -397,6 +399,8 @@ BOOL cdAudio_FillBuffer(ALuint b) {
if (cdAudio_OpenTrack(filename)) {
printf("Now playing %s\n", filename);
break;
} else {
return FALSE; // break out to avoid infinite loops
}
}
}
@ -444,6 +448,8 @@ BOOL cdAudio_PlayTrack( SDWORD iTrack )
music_track = iTrack;
printf("Now playing %s\n", filename);
break;
} else {
return FALSE; // break out to avoid infinite loops
}
filename = PlayList_NextSong();