Looping CD/MP3 audio
|Reported by:||eriktorbjorn||Owned by:||SF/ender|
This should fix bug #549544 ("CD audio/mp3 music does not loop").
For the CD case the code to handle looping was already there - at least in the SDL backend - but slightly broken. I've changed it so that when told to play one whole CD track, it plays only that track, not every track starting from that one.
I haven't checked the other backends.
The MP3 version didn't even try to loop. I've added some code to fix that.
There are still some glitches that I know of that are *not* fixed by this patch:
* When playing from CD, the old track doesn't stop when you load a savegame.
* When playing from CD, pausing the game does not pause the music.
* When playing from MP3, there's a brief noise at the end of the track. It's as if the mixer is trying to loop the track on its own, but only for a fraction of a second. I'm not sure why. I guess the easiest workaround would be to lie and tell ScummVM that the tracks are just a little bit shorter than they really are.
Ticket imported from: #625904. Ticket imported from: patches/203.