Sound manager plugin

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
Kolobrod
Gnoblar
Posts: 10
Joined: Wed Jul 21, 2004 1:39 pm
Location: Krasnodar, Russia
Contact:

Sound manager plugin

Post by Kolobrod » Sun Jan 02, 2005 2:13 am

Simple test of plugin making for OGRE :) Just for loading sound and linking them to scene objects for 3D sound effect...
It`s uses only OpenAL. I plan to improve it in few days for playing vorbis ogg files and maybe deeply integrate with ORGE.

Here is code:http://tool.hotbox.ru/SoundManager.zip(plugin+demo)

I hope this will be useful for someone...
0 x

User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel » Sun Jan 02, 2005 2:55 pm

Thanks ! I was just searching for one ;) !
Problem is : the link is not working :? !
0 x

User avatar
Kolobrod
Gnoblar
Posts: 10
Joined: Wed Jul 21, 2004 1:39 pm
Location: Krasnodar, Russia
Contact:

Post by Kolobrod » Sun Jan 02, 2005 2:59 pm

Try right click - Save As...
0 x

User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel » Sun Jan 02, 2005 3:04 pm

It doesn't work either !
0 x

User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
Contact:

Post by pjcast » Sun Jan 02, 2005 8:02 pm

The link works fine for me when just lift clicking.

Kolobrod, I'm sure many will find this useful. However, when you say deeply integrate with OGRE, don't expect the OGRE team to accept any patches that add audio to the engine, they want to keep it clean, and only have graphics rendering in it.
0 x
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/

User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel » Sun Jan 02, 2005 8:17 pm

You're right, it works now ;) !

EDIT : Sorry to annoy again, but I got these errors while linking :

Code: Select all

--------------------Configuration: Plugin_SoundManager - Win32 Release--------------------
Linking...
   Creating library ..\bin\Release/plugin_SoundManager.lib and object ..\bin\Release/plugin_SoundManager.exp
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alListenerfv
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alDopplerVelocity
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alDopplerFactor
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alListenerf
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alGetError
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alGetError
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcMakeContextCurrent
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcCreateContext
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcOpenDevice
SoundManager.obj : error LNK2001: unresolved external symbol _alutExit
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcCloseDevice
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcDestroyContext
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcGetContextsDevice
SoundManager.obj : error LNK2001: unresolved external symbol __imp__alcGetCurrentContext
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alDeleteBuffers
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alDeleteSources
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourceStopv
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourceStop
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourcei
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourcef
SoundObject.obj : error LNK2001: unresolved external symbol _alutUnloadWAV
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alBufferData
SoundObject.obj : error LNK2001: unresolved external symbol _alutLoadWAVFile
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alGenSources
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alGenBuffers
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourcePlay
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alSourcefv
SoundObject.obj : error LNK2001: unresolved external symbol __imp__alIsSource
..\bin\Release/plugin_SoundManager.dll : fatal error LNK1120: 27 unresolved externals
Error executing link.exe.

plugin_SoundManager.dll - 29 error(s), 0 warning(s)
I'm surely doing something wrong :? !
0 x

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD » Sun Jan 02, 2005 8:53 pm

Archangel wrote:EDIT : Sorry to annoy again, but I got these errors while linking :
(...)
I'm surely doing something wrong :? !
Looks like you aren't linking to the OpenAL lib, don't know its name.
0 x

User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel » Sun Jan 02, 2005 9:19 pm

Thanks ! It works nicely now ;) !

EDIT :
I've looked at the demo code and it looks very simple to use, though I can't compile to test : I get this :

Code: Select all

--------------------Configuration: Demo_Sound - Win32 Release--------------------
Compiling...
Sound.cpp
Linking...
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall CSoundObject::Play(void)" (__imp_?Play@CSoundObject@@QAEXXZ)
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall CSoundObject::AttachToObject(class Ogre::SceneNode *)" (__imp_?AttachToObject@CSoundObject@@QAEXPAVSceneNode@Ogre@@@Z)
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class CSoundObject * __cdecl CSoundManager::CreateSound(class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const &,boo
l)" (__imp_?CreateSound@CSoundManager@@SAPAVCSoundObject@@ABV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@_N@Z)
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall CSoundManager::SetListener(class Ogre::Camera *)" (__imp_?SetListener@CSoundManager@@QAEXPAVCamera@Ogre@@@Z)
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class CSoundManager & __cdecl CSoundManager::getSingleton(void)" (__imp_?getSingleton@CSoundManager@@SAAAV1@XZ)
Sound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall CSoundManager::Update(void)" (__imp_?Update@CSoundManager@@QAEXXZ)
../../Common/Bin/Release/Demo_Sound.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.

Demo_Sound.exe - 7 error(s), 0 warning(s)
I must miss something simple, like in the last post :roll: !
Forgive me for my stupidness :D !
0 x

User avatar
bal
Greenskin
Posts: 100
Joined: Thu Dec 09, 2004 7:29 pm
Location: Geluwe, Belgium

Post by bal » Sun Jan 02, 2005 10:14 pm

This is again a library problem. Did you add the .lib you got by compiling the plugin?
0 x

User avatar
Kolobrod
Gnoblar
Posts: 10
Joined: Wed Jul 21, 2004 1:39 pm
Location: Krasnodar, Russia
Contact:

Post by Kolobrod » Sun Jan 02, 2005 10:29 pm

pjcast wrote:However, when you say deeply integrate with OGRE, don't expect the OGRE team to accept any patches that add audio to the engine, they want to keep it clean, and only have graphics rendering in it.
Yes! It`s just for my needs of course =) I but in this state it wil be fine for my project and such 'deeply' integration is not needed :lol: It will be just a plugin. If this is it...

to Archangel: look at input libs, maybe i sothing remove? It must work for VC8. I get some time now to make ogg files to play corectly and cheeck this out to.
0 x

User avatar
Kolobrod
Gnoblar
Posts: 10
Joined: Wed Jul 21, 2004 1:39 pm
Location: Krasnodar, Russia
Contact:

Post by Kolobrod » Mon Jan 03, 2005 10:58 pm

Now it`s plays Ogg Vorbis files...
0 x

User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel » Tue Jan 04, 2005 8:36 pm

Yeah ! It works, and it's realy nice ;) !
Even if I'm not a professional, I can say that you've made a good work !
Keep this way :)
0 x

User avatar
Goosey
Halfling
Posts: 88
Joined: Wed Sep 29, 2004 3:33 am
Location: Ohio, USA
Contact:

Post by Goosey » Thu Jan 27, 2005 1:54 am

I am getting:
LINK : fatal error LNK1181: cannot open input file 'alut.lib'
Cant seem to locate the 'alut.lib' anywhere. Was I supposed to compile some 3rd party thing before this? :O
0 x
I <3 the OGRE Wiki, and SO SHOULD YOU! :)

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
Contact:

Post by tuan kuranes » Thu Jan 27, 2005 9:31 am

alut is supposed to be in openal distribution. (at least it's my openal SDK)
0 x

User avatar
Azatoth
Gnome
Posts: 327
Joined: Sat Jul 10, 2004 6:46 pm
Location: Sweden
Contact:

Post by Azatoth » Thu Jan 27, 2005 3:39 pm

The link doesn't seem to work.
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Thu Jan 27, 2005 3:50 pm

It did work for me. Just tested it.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Azatoth
Gnome
Posts: 327
Joined: Sat Jul 10, 2004 6:46 pm
Location: Sweden
Contact:

Post by Azatoth » Thu Jan 27, 2005 3:56 pm

Worked for me now too; must have been a temporary outage.
0 x

User avatar
Goosey
Halfling
Posts: 88
Joined: Wed Sep 29, 2004 3:33 am
Location: Ohio, USA
Contact:

Post by Goosey » Thu Jan 27, 2005 9:29 pm

Now I have it compiled (yes, I did not think to download the OpenAL SDK before :oops: ).

Getting a runtime exception however:
Error #: 10
Function: SoundObject::LoadOgg():217
Description: Ogg Vorbis extension not available!
I imagine I am missing something obvious again.

EDIT:

I downloaded the beta wrap_oal.dll and replaced the one in my windows/system32 directory with it. Recompiled Plugin_SoundManager and Demo_Sound.. it now runs without an exception, and I hear the sound start to go.. But it crashes immediately after the sound starts. :|

EDIT EDIT:
Grabbed the ALTest from the same spot.. The results were not great. The ogg test work only with DirectSound and MMSYSTEM, neither of which were able to make use of my rear speakers.. :| I am thinking perhaps the OpenAL Ogg plugin is not stable enough for use yet.. Bad news for me :|

EDIT EDIT EDIT:
I replaced wrap_oal.dll in my system32 with the original and commented out any mention of the ogg sound object from Demo_Sound. It runs fine (with only the wav playing). This is pretty sad news.. I suppose maybe a solution is to use OpenAL for soundeffects only, and another library for music... Anyone know if OpenAL plays nice with SDLMixer? :cry:
0 x
I <3 the OGRE Wiki, and SO SHOULD YOU! :)

User avatar
IoN_PuLse
Goblin
Posts: 220
Joined: Mon May 31, 2004 5:54 am
Location: Canada
Contact:

Post by IoN_PuLse » Fri Jan 28, 2005 12:25 am

You most certainly can use ogg's with OpenAL, you'll just have to write your own streaming code that uses libvorbis =)
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Fri Jan 28, 2005 12:58 am

Great plugin, Kolobrod! :)
It works - and even with ogg-files.
@Goosey : It is generally (IMHO) a bad thing to drop dlls in your system folder - keep them in your bin-folder instead. That way you are controlling what version of OpenAL and Alut you are using.
It works for me - even if the ogg-demo from the SDK fails - that is the beauty of Kolobrods plugin. :D

((Goosey: You might have to put the ogg-vorbis dll's alongside your exe, but that I don't know))
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

stasi
Gnoblar
Posts: 1
Joined: Sat Nov 08, 2003 6:01 pm
Location: Russia
Contact:

Post by stasi » Fri Jan 28, 2005 7:52 pm

thanks a lot
0 x

User avatar
Goosey
Halfling
Posts: 88
Joined: Wed Sep 29, 2004 3:33 am
Location: Ohio, USA
Contact:

Post by Goosey » Sun Mar 13, 2005 8:46 am

Could anyone host a mirror of this please? :| Original host is down and I would really like to try this out again.
0 x
I <3 the OGRE Wiki, and SO SHOULD YOU! :)

computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz » Sun Mar 13, 2005 8:58 pm

Yeah...I think I get a 404 error when I try to download it....(can't read Russian, so I don't know.....)

This would be great for the game I'm writing. I'm planning on using OpenAL anyways :).
0 x
There are 10 kinds of people that understand binary....those who do....and those who don't.

Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner » Sun Mar 13, 2005 9:31 pm

0 x

User avatar
Goosey
Halfling
Posts: 88
Joined: Wed Sep 29, 2004 3:33 am
Location: Ohio, USA
Contact:

Post by Goosey » Mon Mar 14, 2005 7:52 pm

Thanks a ton Mr. Turner! I really appreciate it. Unfortunately it looks like it isn't out-of-the-box ready for use with 1.0.0 (It looks like it isn't updated for the new resource system).

Since I am not that familiar with Ogre's resource system and since I would hate to do work that has already been done... By chance anyone updated the SoundManager plugin for 1.0.0 yet? ;)

If not ill roll up my sleeves and have a go.
0 x
I <3 the OGRE Wiki, and SO SHOULD YOU! :)

Post Reply