First post, by FeedingDragon
Well, I've finally reached a milestone 😀 For me that is. I've gotten all the extra libraries to build without issue, even SMPEG, which it turns out actually needs SDL2 not SDL1, as all the instructions say. So I had to grab SDL2, change all the input libraries to SDL2 versions, and point it to the SDL2 library & include directories. Means having to have SDL2 with my DOSBox package for SMPEG to use, if it worked (another story.) But the drivers all compile, the test programs all play the music in question just fine. Now on to putting them to use with SDL_Sound.
Well, first, smpeg.c has an error on line 173, not enough arguments provided. So, since MP3 is also handled internally, I just disabled it. I tried other options later, but that is covered further down. After that, and going back to build libmodplug as a shared instead of static library, it built just fine.
Next issue, SVN-3998 has 2 small issues in cdrom_image.cpp. The first at line 118 uses the lround macros or function that windows doesn't have (I searched.) A quick define of my own to accomplish the same thing solved that. The other problem at line 122 is that the data call "numeric_limits<int>::max()" which returns the maximum value a normal int can hold, seems to conflict with the 2 instances of "#define max(a,b)" which returns the higher of the 2 values (a or b.) Another easy fix, just replace the numeric_limits with "INT_MAX", breaks portability, but this is for personal use only.
Now, DOSBox (after adding the libraries into Input like I was supposed to do but forgot,) builds just fine. Yay 😀 Mounted a OGG format cue/bin, and it worked like a charm. I, personally prefer MP3's, so I mounted a MP3 format cue/bin and now I get no audio 🙁 Went through all the formats SDL_Sound supports with the following results:
- FLAC - Playback issues covered in another thread
MP3 - No audio
WAV - No audio
RAW - Untested, how is it any different than just a normal cue/bin with audio tracks in the bin file?
AU - No audio
MIDI - DOSBox reports corrupt or bad cue/bin image (won't mount)
VOC - 16-bit will mount (takes it about 5 seconds to actually mount,) and works fine. 8-bit crashes DOSBox
OGG - Works fine
MOD - Including all the different formats, same as MIDI "corrupt" cue/bine and no mount.
SHN - Couldn't test, as I can't find a way to convert "to" that format.
SPEEX - Whatever the extension is for this. SDL_Sound says they support it, but can't find the code for it. I have the library for when/if it ever appears.
Not really all that interested in anything other than the MP3 format. None of my portable players (I have 3,) support OGG, so most of my stuff is in MP3 format. At this point, I decided to take a chance with SMPEG, and tried to "fix" the code in SDL_Sound that kept me from using it. Basically, that one command that doesn't have enough arguments. Digging through the SMPEG source code, I tracked down that it seems to be a size report on the first argument. Could be wrong about that, probably am, as I'll explain in a bit. So, I added in an argument reporting the size of the first one. Now it compiled, DOSBox excepted it fine. Only, when I mount an MP3 format cue/bin, DOSBox crashes 🙁
DOSBox code is clearly set so that as long as SDL_Sound covers it, DOSBox will just pass the file data along and take what it gets back (SDL_Sound does the actual decoding work.) Because of this, I went ahead and used the dynamic version of SDL_Sound (which also forced using dynamic versions of some of the codecs as well.) So, the problem almost definitely lies with SDL_Sound and not DOSBox (other than the 2 minor issues mentioned above.) I'm just hoping (since getting help from SDL_Sound seems to be rather difficult,) that a coder here has some hints for me 😀 This doesn't speak to DOSBox not even appearing to try the MIDI or the MOD styles. Though that could be SDL_Sound as well saying "I can't handle that."
On a related note. If I eliminate everything except OGG format from SDL_Sound, I can get a static build that DOSBox will accept and use without adding to the DLL's that need to be available. OGG format cue/bin files still worked in this case.
On an unrelated note. To fix Aero issues, I have an altered SDL.DLL file, and every mode except ddraw, surface, & overlay can switch back and forth between fullscreen & window without disabling Aero. I remember having the altered source as well, though I can't say if I altered it myself, or used someone else's patch to do so. In the loss of my data files (several moves & a failed HDD,) I've lost that. I've been getting by using exported lib/exp/def files from the DLL, with include files and the SDLmain.lib from a normal build. Does anyone remember the changes, have the patch (.diff) files, or the full source for this? I've dug through my past posts here, and can't seem to find/remember anything 🙁