allegro sound initialisation

This is a discussion on allegro sound initialisation within the Game Programming forums, part of the General Programming Boards category; can anyone give me an example of how to set up sounds in allegro to play a midi file, i've ...

  1. #1
    Shakespeare
    Guest

    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.

    Thanks

    Shakespeare

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

  3. #3
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    I normally wouldn't do this, but, I'm in a good mood.
    Code:
    /* Set up the sound to use digital SFX autodetected, MIDI autodetected, and the 0 is just for compatablilty issues. */
    install_sound(DIGI_AUTODETECT,MIDI_AUTODETECT,0);
    ...
    /* 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, 12:58 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  3. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 03: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, 02:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21