Thread: allegro sound initialisation

  1. #1

    allegro sound initialisation

    can anyone give me an example of how to set up sounds in allegro to play a midi file, i've been trying for about an hour now.



  2. #2
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Did you read the manual? Check out the 'Sound init routines' and 'MIDI music routines' section.

  3. #3
    I normally wouldn't do this, but, I'm in a good mood.
    /* Set up the sound to use digital SFX autodetected, MIDI autodetected, and the 0 is just for compatablilty issues. */
    /* Play sound effect, first argument is the sound file to play, and the second determines if it is looping */
     PlaySound(SOUND_EFFECT, false);
    /* Play MIDI, first argument is the MIDI file to play, and second detemines if it loops */
     PlayMIDI(MIDI_MUSIC, true);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 01:58 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  3. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 04:33 PM
  4. Crossplatform Sound Library -- other than SDL and Allegro
    By frenchfry164 in forum Game Programming
    Replies: 4
    Last Post: 10-14-2003, 04:27 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM