sound
Well, this is not really Irrlicht related !!!
Choose what sound lib you want to use (Audiere, FMod, OpenAL, etc.), work through the tutorials and check for a related forum !!!
Choose what sound lib you want to use (Audiere, FMod, OpenAL, etc.), work through the tutorials and check for a related forum !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
sound has been deliberately removed from the techdemo since version 0.10 in order to reduce download size of the engine.
Now if you just want to play a background sound or music (wav or mp3) I'd suggest using audiere. So follow these simple steps:
1. Download audiere:
http://audiere.sourceforge.net/
2. Uncompress the SDK and link your IDE-compiler properly to audiere's "include" and "lib" folders. (caution, if you're using Devc++ you'll need to get audiere's Devpak via its update feature)
3. Use the following code:
and finish your code for your app afterwards.
ps. Remember to place a copy of audiere.dll with your exe or you'll get errors.
Now if you just want to play a background sound or music (wav or mp3) I'd suggest using audiere. So follow these simple steps:
1. Download audiere:
http://audiere.sourceforge.net/
2. Uncompress the SDK and link your IDE-compiler properly to audiere's "include" and "lib" folders. (caution, if you're using Devc++ you'll need to get audiere's Devpak via its update feature)
3. Use the following code:
Code: Select all
#include <irrlicht.h>
#include <audiere.h>
#include <stdio.h>
#include <windows.h>
using namespace irr;
using namespace audiere;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
#pragma comment (lib, "audiere.lib")
//-----------------------------------------------------------------------------------------------//
int main()
{
IrrlichtDevice *device = 0;
device = createDevice(video:: EDT_OPENGL , core::dimension2d<s32>(800, 600), 32, false,false,false,0);
//-----------------------------------------------------------------------------------------------//
//initialize audio
AudioDevicePtr audiereDevice;
OutputStreamPtr stream;
audiereDevice = OpenDevice();
if (!audiereDevice)
return 1;
stream = OpenSound(audiereDevice.get(), "./data/song3.mp3", true);
if (!stream)
return 2;
stream->setRepeat(true);
stream->setVolume(1.0f); // 50% volume
stream->play();
ps. Remember to place a copy of audiere.dll with your exe or you'll get errors.
why there is that error :
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
[Linker error] undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
I tried it using DevC++, and downloading audiere via the update feature you mentioned.
I get the following errors and altough I've tried I don't manage to solve the problem:
[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
Thanks
I get the following errors and altough I've tried I don't manage to solve the problem:
[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
Thanks