We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 19 - SDL_mixer+mikmod broken on Mac OSX
Summary: SDL_mixer+mikmod broken on Mac OSX
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: PowerPC Mac OS Classic
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-03 12:08 UTC by Ryan C. Gordon
Modified: 2006-04-30 21:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2006-01-03 12:08:53 UTC
Hello !

On Windows and Linux SDL_mixer works without problems.
When i compile it on Mac OSX SDL_mixers internal MikMod
version produces no sound output.

MIDI, WAVE and others formats work, also libmikmod works.

Is this a known problem ?

iBook G4 1 GHz, Latest OSX Tiger with all Updates.
XCode 2.2

CU
Comment 1 Ryan C. Gordon 2006-01-03 12:09:13 UTC
Ryan C. Gordon wrote:

>>>> When i compile it on Mac OSX SDL_mixers internal MikMod version 
>>>> produces no sound output.
>
>>
>> I believe it's been posted before, but I haven't had a chance to
>> research it at all.


Ryan, I think it has something to do with some interesting code in virtch2.c
;-)

#if defined(macintosh) || defined(__APPLE__)
#define NO_64BIT_MIXER
#endif
[... snip ...]

#ifdef NO_64BIT_MIXER
                                /* Uh oh, the 64-bit mixers don't compile...
*/;
#else

The latter essentially translates to "produce no output if the song is long
enough", where 'long enough' is a few milliseconds at 22.5KHz.
We should see how later versions of MikMod handled 64bit ints on Apple
compilers.

-Alex.

Comment 2 Jon Atkins 2006-01-04 02:58:32 UTC
what about using the external libmikmod linkage, which should be later (if if gets updated of course) than the one in SDL_mixer.  At least try that option (which is already in SDL_mixer's configure script) to see if a later version does fix the problem.
Comment 3 Alex Volkov 2006-01-04 13:11:55 UTC
Though I don't have MacOSX myself, I've checked the various libmikmod versions (pre- and post- the mentioned change). None of the libmikmod versions ever had such #ifdef code. According to CVS, these #ifdefs were introduced during a port to MacOS (classic?) in virtch2.c rev 1.2.
The next revision (1.3) added the defined(__APPLE__) to the existing #ifdef, which broke MacOSX:
  "Darrell Walisser - Sun Aug 19 00:47:22 PDT 2001
   * Fixed compilation problems with mikmod under MacOS"
-#ifdef macintosh
+#if defined(macintosh) || defined(__APPLE__)

I am willing to bet the disabled code will, in fact, compile just fine on MacOSX ;) But someone should try it, of course. Perhaps some better #ifdef checks should be used so that they only apply to MacOS classic.
Comment 4 Ryan C. Gordon 2006-01-19 06:28:23 UTC
Tossing the SDL_mixer bugs to Sam (all three of which might be the same bug in practice)...if you don't want these, toss them back to me.

--ryan.

Comment 5 Ryan C. Gordon 2006-01-27 11:23:04 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 6 Sam Lantinga 2006-04-30 21:16:19 UTC
Fixed in subversion, thanks!