#261 CD images bugfix under DOSBox

open
nobody
5
2012-09-07
2006-05-31
No

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.

Discussion

  • Germán Méndez Bravo

    CD images fix

     
    Attachments
  • Martin Bättig

    Martin Bättig - 2006-06-01

    Logged In: YES
    user_id=673822

    Sound_GetDuration is still only available in the svn version
    of SDL_Sound. So I recommend to modify configure.in that it
    only enables SDL_Sound if that function is available. But
    the old code really works (at least under linux for mp3 and
    ogg, wav and aiff do not work there as well), so why not
    keep it for users of a release SDL_Sound version?

     
  • Germán Méndez Bravo

    Logged In: YES
    user_id=218084

    Yeah, it's going to be a problem if it's only on the svn
    version... the Sound_Seek() version won't work on the new
    svn, I believe, I checked the code and it always returns
    true. The new way is faster and better though, so we could
    force DOSBox need the svn version (or one that has the
    Sound_GetDuration.)

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks