freesci-develop
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [freesci-develop] Concerning C416: No sound on Mac OS X


From: Martin Bom
Subject: Re: [freesci-develop] Concerning C416: No sound on Mac OS X
Date: Sun, 28 Sep 2003 01:38:39 -0700

The first pcmout driver is pcmout_driver_sdl, the first sound server
driver is sound_server_unix. The SDL audio init inside the unix sound
server fails.
Good job debugging this! Do you have any ideas as to what the reason
for this is? Are there some special resources only allocated for
the initial process, but not to forked-off processes?

The SDL audio init fails on calling SndNewChannel, the error is a general 'not enough hardware' (so basically a 'go figure'). Normally this error should come up when the requested audio preferences are not present (i.e. stereo request on mono audio output). I tried calling the Carbon sound function (that failed) inside a NSThread sample program without any problems however it was called after setting up the autorelease pool. The SDL soundserver calls SDL_INIT_EVENTTHREAD before it calls the SDL_INIT_AUDIO and my bet is that it creates a correct similar release pool so that the Carbon SndNewChannel can do its thing. To summarize, its probably not the forked-off process itself, but a missing memory allocation/setup or so that is needed for Mac functions to work in a thread/forked-off process.

to the SDL one on OS X. Are there any preprocessor macros or easy
runtime checks to check for it? (The function we use for picking a
sound server is a function precisely so that it can be customised
for individual platforms. (At least I hope it's a function; I didn't
bother to check-- almost everything else is, though).)
Would it be possible to correct the default sound server driver in
sound.c, so move the sound_server_sdl above the sound_server_unix?
If it really performs better in general, that makes sense. I believe
that using a platform-specific handler would be more robust, though.

If the preference is to ifdef the fix for OS X, then thats fine for me. What I was thinking was that if the SDL sound output is chosen, it would be better to use the SDL sound server too by default. On linux there might not be any issue with using the SDL sound output together with the unix sound server right now but if SDL would change something you might end up trying to find a similar bug as OS X ran into. For the ifdef-fix would the preference be to change the 'config.c' where the default sound server gets set or 'sound.c' where the sound servers get listed?
In the freesci 0.3.4a release I noticed a lot of DREAMCAST comments, in
the latest cvs snapshot I do not see these anymore in sound.c, is it
There are already plenty of ifdefs in sound.c, in the 0.3.4a code there were some DREAMCAST ifdefs inside config.c but they are gone in the latest tip (version mentions 0.3.4c).

Also, I noticed that the latest overnight builds were breaking on
mkdir, is there a fix for this already planned or can anyone submit a
The code compiled fine on my machine however the latest daily logs on sci.hellabs.org show a compiler error in 'tools.c', the same bug seems to appear in the last couple of builds, maybe the build log just does not get refreshed.

On Saturday, September 27, 2003, at 02:04 PM, Christoph Reichenbach wrote:
Hi,

[...]
Basically in config.c the default pcmout_driver gets set by





reply via email to

[Prev in Thread] Current Thread [Next in Thread]