From: varobert AT colba DOT net Message-Id: <3.0.32.19990815235810.007b5580@mail.colba.net> X-Sender: varobert AT mail DOT colba DOT net X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Sun, 15 Aug 1999 23:58:17 -0400 To: djgpp AT delorie DOT com Subject: Re: Sound with allegro Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com At 04:58 PM 8/15/99 -0700, you wrote: >I'm trying to get sound to work under Allegro. I know I have digi_driver >set correctly, how do I know midi_driver. (sorry, stupid question). I've >checked and doublechecked, and the problem isn't the .wav file being there. >It compiles fine (gxx -o sound.exe sound.cpp -lalleg), but no sound comes >out when I run it. > >Thanks in advance, > Al [muaddib AT proaxis DOT com] > >#include > >void main() > { > allegro_init(); You have to install the timer. Use install_timer() for that. It is required for playing sound. > detect_digi_driver(DIGI_SB16); > detect_midi_driver(MIDI_AWE32); // i guessed that, beacuse it sounds You don't need to detect them if you don't bother to check the return values. >familiar, how do i know what to put here? > install_sound(DIGI_SB16, MIDI_AWE32, ""); Are you sure AEW32 is right ? try MIDI_AUTODETECT and see. You might also want to replace the "" with NULL. > > SAMPLE *amazing = load_wav("c:\\amazing.wav"); > > play_sample(amazing, 255, 128, 1000, 0); Add some delay here. The sample will start playing, but you need to do something while it plays, or it will immediately stop ! > > allegro_exit(); This line is unneded. allegro_init() sets this up for you. > } > >I have sound.cfg in the same directory configured as follows: > >digi_card = SB16 >midi_card = AWE32 >digi_voices = 1 >midi_voices = 1 You may want to use more than 1 voice (try -1 for auto) >quality = 1 >flip_pan = 1 >sb_port = 220 >sb_dma = 1 >sb_irq = 5 >sb_freq = 30000 >fm_port = 388 >mpu_port = 330 >mpu_irq = 5 >digi_volume = 128 >midi_volume = 128 > > - GodOfWar There is always one more bug.