mp3 bgm in allegro

This is a discussion on mp3 bgm in allegro within the Game Programming forums, part of the General Programming Boards category; Ok kids, I'm working on Firestater, from FLCL. The game part of it is done and all that's left to ...

  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
    University of Waterloo
    Posts
    1,904
    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
    University of Waterloo
    Posts
    1,904
    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, 03: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, 03:45 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-21-2002, 12:35 AM

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