Thread: mp3 bgm in allegro

  1. #1
    GA ichijoji's Avatar
    Join Date
    Nov 2002
    Posts
    179

    mp3 bgm in allegro

    Ok kids, I'm working on Firestater, from FLCL. The game part of it is done and all that's left to do right now is put in some serious artwork and a few more levels.

    I want to put in some background music from the series, but I only have it in mp3 format. Is there any simple way to do this, like maybe a specific library or something?
    Illusion and reality become impartiality and confidence.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    fmod.org

    ^^^ Probably one of the best music api's i've seen as of yet, and it's free! (unless you're selling your game/program...then you have to pay for it)

  3. #3
    GA ichijoji's Avatar
    Join Date
    Nov 2002
    Posts
    179
    Ok, I downloaded that and installed it, and I tried loading my file in two different ways:
    Code:
    FSOUND_SAMPLE *bgm = FSOUND_Sample_Load(FSOUND_FREE,"star.mp3",FSOUND_NORMAL,0,0);
    Code:
    FSOUND_STREAM *bgm = FSOUND_Stream_Open("star.mp3",FSOUND_NORMAL | FSOUND_STREAMABLE,0,0);
    In both cases, the following line gave me an error:
    Code:
    if (bgm == NULL) error("Unable to load \"star.mp3\"");
    Am I using the wrong flags, or is there a problem with the relative filenames, or what?

    EDIT:
    I checked with ifstream and the file is definitely there.
    Illusion and reality become impartiality and confidence.

  4. #4
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    make sure you're calling FSOUND_Init

    Code:
     FSOUND_Init(44100, 32, 0);
     


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Game Programming FAQ
    By TechWins in forum Game Programming
    Replies: 5
    Last Post: 09-29-2004, 02:00 AM
  2. mp3 players vs mp3 cd players
    By Geo-Fry in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-06-2003, 09:22 PM
  3. double buffering for allegro
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 09-12-2002, 02:45 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-20-2002, 11:35 PM