BGMUSIC need help

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

BGMUSIC need help

Post by mepatuhoo »

how do i play an mp3 and loop it? i need it to loop on at begining when the window open's
Conquistador
Posts: 340
Joined: Wed Sep 28, 2005 4:38 pm
Location: Canada, Eh!

Post by Conquistador »

Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

how do i use that program in my program to play and loop the mp3? what should i call and how should i call it?
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Audiere is the simplest api that you will ever use.

Code: Select all

#include "audiere.h"

using namespace audiere;

//in main

//initialize audio 

   AudioDevicePtr audiereDevice; 
    OutputStreamPtr stream; 

    audiereDevice = OpenDevice(); 
    if (!audiereDevice) 
     return 1; 

    stream = OpenSound(audiereDevice.get(), "YOURSOUNDFILE.wav", true); 
     
    if (!stream) 
     return 2; 

    stream->setRepeat(true); //Loop??
    stream->setVolume(0.15f); // 15% volume 
    stream->play(); 
It's that simple. Link to the audiere lib and add it's dll to your app.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

do you happen to also know anything about one line edit boxes. i have asked others and all they do is link me to the api i looked at the api and still dont get it i would like it if some one could show me an example of how to make a one line edit box. thats probly the only way ill get it becouse the api is not very intuitive i think.
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

i used the code that you posted and i got the following errors
[Linker error] undefined reference to `_imp__AdrOpenSound@12'
[Linker error] undefined reference to `_imp__AdrOpenSampleSource@8'
[Linker error] undefined reference to `_imp__AdrOpenDevice@8'
ld returned 1 exit status
irrlicht-0.14.0\examples\Project\Makefile.win [Build Error] [StartMenu.exe] Error 1
Guest

Post by Guest »

I'm getting the same error messages as you 3 months on. Anybody know audiere? I think I'm having problems cos I'm using Gcc but I'm not too sure
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

It looks like you need to add the Audiere library to your link line.
Post Reply