VOGONS

Common searches


First post, by marzsyndrome

User metadata
Rank Newbie
Rank
Newbie

Curiously, I discovered today - after ages spent in confusion as to whether my Ogg tracks were faulty - that seemingly none of the current CVS spinoff builds support Ogg Vorbis tracks in cuesheets, including the tharos-online version, which I always believed to be nothing more than a daily snapshot 'capture' of the official CVS code.

And yet the current latest official release - 0.73 - can handle Oggs without a problem. Now either all the CVS builders decided to omit Vorbis support for whatever reason, or said Vorbis support is possibly being phased out before the next official release. Hopefully I'm wrong and being a tad paranoid, right? 🤣

Reply 2 of 14, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Support for file-based audio in cuesheets is through the sdl_sound library, which is considered an optional component in DOSBox builds. You don't have to change any DOSBox code to include or omit stuff that is optional; the build environment takes note of its presence or absence at configuration and acts accordingly. I can understand why sdl_sound would be left out, because correctly configuring it is not as straightforward as the other libraries.

Reply 3 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Yup, especially on Windows, building with MingW/Msys is not easy with SDL_Sound, since it pulls in so much other stuff that needs to be compiled first, that I never made it happen, it would always crap out on one lib or another.
Now on Mac it builds fine 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 14, by marzsyndrome

User metadata
Rank Newbie
Rank
Newbie

Out of interest, a look at dosbox.exe through a hex editor (or even metapad) reveals references to MP3, OGG, WAV, RAW, AIFF, AU and VOC. The last five - from testing - are all supported, yet DOSBox doesn't seem to co-operate with MP3 for some reason. IMGMount will happily accept a cuesheet with MP3 references, yet won't play them during the game in question. Is it still missing a library?

Reply 6 of 14, by danielc

User metadata
Rank Member
Rank
Member

It's not a mystery, you have to define C_SDL_SOUND as 1 when building. It's completely ommitted from the trunk/repo sources for some reason so if you're using VC++ like me then rebuild it yourself with #define C_SDL_SOUND 1 in the config.h file. Of course you need SDL_sound too though.

I will also apply for a Wiki account soon and expand the VC++ building page for all the extra dependencies/includes (zlib, libpng, etc) and how to apply patches and stuff too since I have figured all this out mostly on my own, i.e. my own SVN build should have all features of an official release so it's good knowledge for people who don't know C++ but know how to at-least read code and build stuff (just like me).

P.S. The latest "pre-0.74" trunk code is awesome fast on my midrange-AMD, Win7 x64 machine. Seriously amazing work DOSBox team!

Regards,
CosmicDan

Reply 7 of 14, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Mystery NOT solved. That's needed to get SDL_sound to work at all; the problem is that OGG encoded tracks work but MP3 encoded tracks do not. At least it WAS the problem... I haven't looked to see if there are new versions of the library.

Reply 8 of 14, by danielc

User metadata
Rank Member
Rank
Member

Oh. My mistake. Well... I personally don't see the need for MP3 when you've got Vorbis? Why is MP3 preferred? I am using the 1.0.3 release of SDL_Sound for now, will try trunk versions soon if I can't get FLAC to work.

FYI for those who don't know, specifying the type as MP3 is standard cuesheet stuff which really translates literally to "this is a compressed external CD Audio track" and OGG as a type is not part of the standard .cue filespec (technically neither is MP3).

Regards,
CosmicDan

Reply 9 of 14, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't remember anyone stating that MP3 was preferred; only that it appears to be supported, yet doesn't work. Perhaps there's some compile option within SDL_sound, or some dependency that must be resolved. I think it was also theorized that the author just plain never finished the support for it. 😉

Reply 10 of 14, by danielc

User metadata
Rank Member
Rank
Member

Yeah I was thinking the same thing. SDL_Sound by default has a crap load of optional libraries for other formats, MODPLUG for example will support Tracker formats (XM/MOD/IT/etc) 😳 But I will check it out since Im in the middle of dabbling with it all right now, and am enjoying this learning experience 😁

I wouldn't be surprised if he "accidently" didn't finish support for it, MP3 is not only dated but it is proprietary afterall! Though MP3 support would be nice for completions sake, also it's friendlier on lower-powered systems as Vorbis decoding could be a bit too much on platforms where every clock counts (e.g. DOSBox ports for iPhone, S60, PSP, etc)

Regards,
CosmicDan

Reply 11 of 14, by prompt

User metadata
Rank Newbie
Rank
Newbie

Problem with mp3, wave and others is due to a bug in SDL_sound's Sound_Seek function that is used to determine the length of a sound file. No possibility to fix it currently other than using a development version of SDL_sound and using its Sound_GetDuration function instead.

Reply 12 of 14, by danielc

User metadata
Rank Member
Rank
Member
prompt wrote:

Problem with mp3, wave and others is due to a bug in SDL_sound's Sound_Seek function

I actually noticed this the other day along with some other problems in cdrom_image, but thought it might have just been me (I build in MSVC and SDL_Sound took some work to even build properly). Thanks for confirming it as I wasn't sure what was wrong with SDL_Sound.

No idea if any of the dev's are actively looking into this specific issue at the moment but I hope to get at least MP3 and FLAC working soon. Hopefully we can sort this out in time for 0.74 😊

EDIT: I also noticed that, compiling DOSBox with SDL_Sound support causes a performance hit - even if you don't have any CD-ROM images mounted at all let-alone one with compressed CD-Audio tracks. A standard PCPBench run a few times gave me a whole 5fps difference when comparing.

Regards,
CosmicDan

Reply 13 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
danielc wrote:

No idea if any of the dev's are actively looking into this specific issue at the moment but I hope to get at least MP3 and FLAC working soon. Hopefully we can sort this out in time for 0.74 😊

Unlikely, I've finalized my build environment for 0.74
I could use somebody who would test if the ogg support actually works as I did change some of the libs with different versions.

Water flows down the stream
How to ask questions the smart way!