Okay there were some bugs in the code that prevented
some CD images from being mounted or working properly.
The MP3/CUE images couldn't be mounted (at least under
windows). One of the bugs I fixed is about the PREGAP
not working (it was missing a check to see if the
sector being read was part of a gap) The other bug was
about getting the correct length of an audio file.
DOSBox was using Sound_Seek(), the problem with this
is that at least for the current version of SDL_Sound,
Sound_Seek() always succeeds, making getLength()
useless. I just changed it for a Sound_GetDuration()
which by the way is a faster way of doing it. I think
Sound_GetDuration() is rather new, and it might have
not been available at the time of that part of DOSBox
was first written.
Okay without any further ado, I'm attaching the patch
to fix this issues.