Thanks Sam for that great link.
Sorry to bother you people again, but I simply must ask for help.
I am a newbie to SDL. I am porting a program originally written
using DirectX in VC to SDL. There was no problem until I used
SDL_mixer instead of FMOD which was used in original code.
My problem is in this code…
Uint16 audio_rate = MIX_DEFAULT_FREQUENCY;
Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */
Uint16 audio_channels = 2; /* Stereo */
Uint16 audio_buffers = 4096;
if (Mix_OpenAudio (audio_rate, audio_format, audio_channels,
audio_buffers))
{
fprintf (stderr, “Mix_OpenAudio: Unable to open audio!\n”);
return false;
}
The problem arises when I use
Uint16 audio_rate = 44100;
instead of
Uint16 audio_rate = MIX_DEFAULT_FREQUENCY; // = 22050
The sound quality increases and thats good. But while terminating,
the program crashes.
The error report says…
AppName: Space war.exe AppVer: 0.0.0.0 ModName: ntdll.dll
ModVer: 5.1.2600.0 Offset: 000054d8
Exception Information
Code: 0xc0000000000000000 Flags: 0x00…
Record: 0x00… Address: …
System Information
Windows NT 5.1 Build: 2600
CPU Version: 00000653 CPU Feature Code: 0183F9FF
and blah… blah…
I know this is not enough to guess what heppened but I have a hint
that NTDLL.DLL crashed whenever I tried to use 44100 audio rate in
MixOpenAudio function.
The system is:--------------
CPU: PII - 400MHz (Obviously 32bit
Graphic Card: Intel i740
Graphic Card driver: Manufacturer:- Microsoft
Driver version:- 5.1.2001.0
RAM: 256 MB SDRAM
Sound Card: Crystal CS4236B
Driver Manufacturer:- Microsoft
Driver Version:- 5.1.2535.0
OS: WinXP Pro (ver 2002)
Please, please, please… somebody help me! Its an emergency!
I need to learn more and more and more and more … I want
the finest detail about how this library works (because its a GREAT
lib and I am fascinated by its power and simplicity and … of
course, games! Heh heh!)
Also, I would like to repeat my previous question again…
How can I use 32 bit quality sound with SDL?
FMOD uses it like this…
FSOUND_Init(48000, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH);
Sam, please help me! Because I want to see this lib on the top!!
Thanks.
Nayan