[AD] DirectX sound driver detection bug?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi there,

Below is the start of some sound initialisation code that crashes one of my
games when run on Windows 2000 with a SoundMax Digital Audio Vers 5.00 sound
card. The code was compiled with Mingw 1.1 and statically linked against
Allegro 4.0.1 and 4.1.1 using march=i586.

string
   setting = "flip_pan = " + lexical_cast<string>(cfgFlipPan);
override_config_data(setting.c_str(), setting.length());
reserve_voices(6, -1);

allegro_message("1");

if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, 0))
{
   allegro_message("Failed to install sound. Allegro error: %s",
      allegro_error);
}

allegro_message("2");

// ...

Windows reports the following error after the crash:

The instruction at "0x0044c67c" referenced memory at "0x00000000".
The memory could not be "read".

Using the allegro_message() calls above, the error seems to be in the call to
install_sound(), as the second and third messages are not displayed. When
disabling the sound card in Windows, the error changes. Now it prints
"Failed...", then crashes.

Using an allegro.cfg file with the sound driver set to any of DXC, AXC, WOA,
WOB works.

I don't know what to make of this. Shouldn't install_sound() detect a card
using DXC? If not, it should at least not crash.

-- 
Sincerely,
Daniel Schlyder

P.S.: Is flip_pan needed on other platforms than DOS?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/