background music/allegro

This is a discussion on background music/allegro within the Game Programming forums, part of the General Programming Boards category; hi anyone know a way to play a 234KB wav file as background music? i have tried load_sample(); /// then ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    479

    background music/allegro

    hi

    anyone know a way to play a 234KB
    wav file as background music?

    i have tried

    load_sample();
    /// then i try to play it...
    play_sample();

    but i think the size of my file is to big
    anyone know a better way?

    thanks in advance!

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    234kb for a wav is TINY!, anyhow i use at the moment
    the PlaySound() command from the winmm.lib,try using
    that.
    Ask for more info if you dont know it

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    tell me more please!

    it may be tiny for a wav but i still
    think for the function its to big

  4. #4
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    It's not too big of a file size. Again, go read the docs for Allegro or go do a search around at allegro.cc

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Include "winmm.lib" in the link options of your project then
    include "windows.h" then
    use playsound:

    Code:
     PlaySound("test.wav", NULL, SND_FILENAME | SND_SYNC);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to load background pic/texture in OpenGl?
    By salman86 in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2005, 06:37 PM
  2. Load Bitmap as Window Background
    By Epo in forum Windows Programming
    Replies: 6
    Last Post: 07-19-2005, 09:37 AM
  3. Windows background color
    By Exile in forum Windows Programming
    Replies: 2
    Last Post: 01-23-2005, 06:55 AM
  4. Detect Close of a background process
    By Schwarzhelm in forum C Programming
    Replies: 1
    Last Post: 11-05-2003, 12:46 AM
  5. background process switches to stopped
    By bonkey in forum Linux Programming
    Replies: 3
    Last Post: 11-20-2002, 07:27 AM

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