[SDL] Unexpected exit at first SDL_mixer call (v1.2.11 in mingw-cross-env)
R.Lamprecht at T-Online.de
Tue Mar 2 07:11:38 PST 2010
Am 02.03.2010 15:52, schrieb David Bruce:
> Sorry to repost this, but I haven't heard anything after a few days -
> wonder if the svn-mercurial thread occupied everyone's attention.
> Does SDL-mixer 1.2.11 work properly when cross-compiled for mingw32 on
> a linux build machine, as far as everyone knows? The code within
> tuxtype that uses SDL-mixer hasn't changed for ages, and the program
> works fine on linux using SDL-mixer 1.2.8.
> Any suggestions?
> Should I remove 1.2.11 from my mingw-cross-env setup and replace it
> with SDL-mixer 1.2.8?
SDL-mixer 1.2.8 did not use Mix_Init(). You should add it prior
OpenAudio for 1.2.11 usage.
> On Fri, Feb 26, 2010 at 7:03 AM, David Bruce<davidstuartbruce at gmail.com> wrote:
>> I've adapted my windows cross-compile build for tuxtype
>> (git://git.debian.org/git/tux4kids/tuxtype.git, "mingw-cross-env"
>> branch) to use the mingw-cross-env project. As a result, the
>> crossbuild now uses SDL_mixer 1.2.11 instead of a much earlier version
>> in my older win32 builds.
>> However, now tuxtype exits unexpectedly at the initial call to
>> Mix_OpenAudio(). Here is a snippet where the problem occurs:
>> if (settings.sys_sound) //NOTE - can be turned off with "--nosound"
>> runtime flag
>> fprintf(stderr, "-about to call Mix_OpenAudio()\n");
>> if (Mix_OpenAudio(22050, AUDIO_S16, 1, 2048) == -1)
>> fprintf(stderr, "Warning: couldn't set 22050 Hz 8-bit audio\n -
>> Reasons: %s\n", SDL_GetError());
>> settings.sys_sound = 0;
>> fprintf(stderr, "Mix_OpenAudio() successful\n");
>> The last output I get from the windows crossbuild is "-about to call
>> Mix_OpenAudio()\n" - it never gets to the SDL_GetError() call.
>> If I start tuxtype with "tuxtype --nosound" to skip this step, the
>> program runs fine (but silently :( )
>> The same program works fine on Debian and Ubuntu, using SDL_mixer
>> 1.2.8 (at least on Debian - not certain what version is in Ubuntu
>> Thanks for any help,
>> David Bruce
More information about the SDL