Latest version 1.27

stickymango

09-11-2008 14:47:45

Hi all,

I'll use this topic to notify the latest development details, kicking off with v1.0 in SVN and File Release system now!:

* Added OGRE plugin support as contributed by Highway.

You can now use the plugins.cfg/loadPlugin() interface to register the library with OGRE, what this does is add a new MovableObject type which creates OgreOggISound objects. This also automatically creates/destroys both the manager and all sounds created.

This is an optional use of the library at present so no code changes should be required for current use. Usage should still be through the OgreOggSoundManager::createSound()/OgreOggSoundManager::destroySound() functions, however you can pass a SceneManager reference to createSound() allowing attachment to a particluar SceneManager.

Destruction of any sounds via the SceneManager will be handled automatically.

Any problems give me a shout.

NOTE:- Library comes with VC2005 (vc 8.00) prebuilt libs, please recompile if using VC2008 (vc 9.00)


Enjoy! :)

stickymango

12-11-2008 09:43:46

Update in SVN (also available as a zip download):

* Fixed bug in multi-threaded wav sounds not looping when requested at creation time.
* Fixed infinte loop bug in wav sounds which have extra information.
* Fixed pauseAllSounds() bug NOT pausing sounds (doh)

stickymango

10-12-2008 23:07:22

SVN Update:

* Fixed random crash in streamed sounds on shutdown

stickymango

11-12-2008 21:42:40

As the library has been in the wild for a few months now and statistics would suggest a fair few users, I've decided to commit the current version as an offical stable release :D

SVN and the File Release System are now synchronised and I'll be creating a stable branch in the SVN repository to mark this milestone.

Thanks to all who have taken a look, used and/or are currently using the library, you've all helped me get it this far :)

Hopefully it can continue to prove useful for people

Regards, Sticky.

kungfoomasta

11-12-2008 23:42:07

Usage should still be through the OgreOggSoundManager::createSound()/OgreOggSoundManager::destroySound() functions, however you can pass a SceneManager reference to createSound() allowing attachment to a particluar SceneManager.

Sorry for the noob question, but in order to call OgreOggSoundManager functions you have to add OgreOggSound library as a dependency to your project, no? It seems like this negates any real benefits of using the plugin system. If I'm totally off base, can anybody post up a snippet of how a sound is created through the plugin interface?

stickymango

12-12-2008 14:25:23

Hi Kungfoomasta,

I'm a noob to the plugin system also so I'm not sure I understand what you are asking but as I see it, the plugin method adds the automation aspect of creation/destruction and management of sound objects via the SceneManager interface.

In terms of dependency you link to the lib and call loadPlugin() which seems the same for other plugins such as ParticleUniverse or have I got that wrong?

There is no difference to the interface for creating sounds except for an additional SceneManager* to the createSound() function, behind the scenes it calls createMovableObject()...

The benefit of loading as a plugin is that should you destroy the SceneNode a sound is attached to, the SceneManager will automatically destroy the sound object attached to it.

Is that any help?

stickymango

12-12-2008 14:27:20

Update in SVN:

* Added shared buffer support for static sounds

kungfoomasta

12-12-2008 18:36:48

The ParticleSystem example is odd, considering the SceneManager has a createParticleSystem API interface, even when the plugin is not loaded.

Plugins can be made for SceneManagers, MovableObjects, and RenderSystems. For MovableObjects, the intended API to use for custom (plugin) objects are:


virtual MovableObject* Ogre::SceneManager::createMovableObject ( const String & name,
const String & typeName,
const NameValuePairList * params = 0
)


However this is a very general interface, you can't easily tweak the parameters of the custom object except through name/value pairs.

Automatic creation/deletion is nice, but manual management isn't so difficult in this case. I'm not saying the Plugin support is bad, I just don't see any usefulness to it, and having support definately doesn't hurt anybody.

stickymango

22-12-2008 22:08:29

SVN update:

* Added audio capture support
* Capture audio to WAV file format.

stickymango

02-01-2009 10:23:10

Current version 1.02 :)

* Synchronised File Release system with SVN.
* Capture support added to .zip release

stickymango

05-01-2009 17:05:23

* Fixed crash in OgreOggSoundRecord destructor
* Fixed crash in TestDemo
* Synchronised File Release and SVN

stickymango

29-01-2009 16:37:07

* Fixed crash when creating a streamed sound

stickymango

12-02-2009 15:46:09

Started porting code to linux, however I'm working blind as I don't have a linux setup at the moment :shock: so any testers/help would be greatly appreciated, I've made attempts to wrap sections of problem code with #ifndef_LINUX_ blocks as well as removing windows specific type references.

I've updated SVN with these changes so if anybody can attempt a compilation on linux or indeed OSX it would be much appreciated!

Many thanks,

scratchyrice

12-02-2009 20:24:52

Cool, currently in the process of porting my engine to use this libary. OgreAL is too full o holes.

Cheers

Scratchy

stickymango

12-02-2009 23:57:16

Great news!

What platform are you working on?

scratchyrice

12-02-2009 23:58:57

Windows, Later porting to linux.

BTW, im currently having a problem with 3d positional sounds. No matter where i place the node or listener, It always sounds the same.

Cheers

Scratchy

stickymango

13-02-2009 14:45:13

Is your sound file mono?

Have you tried using the "Generic Software" driver?

Does the demo app work?

scratchyrice

13-02-2009 22:42:14

Oops, I thought i posted, Guess it didn't get through. I managed to get it working shortly afterwards, I cant recall what it was now. Now ive got it all worked out, This library seems to be far less buggy, and more up to date than ogre al, Why more people do not use this, i will never know.

Cheers

Scratchy

stickymango

13-02-2009 23:40:51

Great news!

I'm assuming it wasn't anything to do with the library or was it a bug you corrected?

Thanks for your kind words, I'm hoping word does spread so that more people do try it out and all bugs or niggles can be ironed out, I'm working on a linux port so maybe that will encourage a lot more people.

Enjoy the lib!

scratchyrice

14-02-2009 08:15:43

It was a bug in my own coding, yes.
Oh and No problemo mate. It's well deserved.

Cheers

Scratchy

stickymango

18-02-2009 10:31:00

Currently got CMake to build the library on linux, however I'm still getting to grips with the building/installing process on linux, so I'm not sure how much use this is to people, any advice or help would be much appreciated.

stickymango

26-02-2009 16:23:45

* Stripped out .zip release with unnecessary files, now around 5mb download
* added Linux CMake support - should now build with CMake on Linux
* Need Linux devs to try it out and let me know any further steps required to allow applications to use the lib.

Thanks.

stickymango

10-03-2009 13:41:14

As detailed in another post there have been some more updates :) :

* Added seek support for playback positioning within sounds
* Fixed bug playing stopped sounds when reactivating..
* Added time information - getAudioLength() to sounds
* Made minor return value adjustments to isPlaying() and isStopped() functions, to reflect overall state.
* Updated docs


SVN revision no. 130

Please update and enjoy! :D , any issues give me shout!

Thanks.

stickymango

13-03-2009 12:29:02

Updated SVN and .zip releases to include some significant updates:

* Added mutex locking to sound objects to prevent crashes when calling sound functions directly (Affects Thread support ONLY)
* Fixed bug where calling sound functions immediately after creation has no effect (Affects Thread support ONLY)

OgreOggSoundManager has playSound()/pauseSound()/stopSound() which was the preferred method of actioning created sounds, they remain for compatibility purposes
* Added vc8 and vc9 project files ( NOTE:- distributed lib has been compiled using Visual Studio C++ 2005 Express [vc8] )
* Added cue point list to allow 'jump-to' points within a sound file.


Enjoy! :D

stickymango

25-03-2009 10:29:59

Bug-fix update to SVN:

* Fixed infinite loop bug in OgreOggStreamSound::_stream() if using non-seekable ogg's
* Fixed bug in OgreOggStreamSound::pause() missing 'return;' after source check.
* Moved non-seekable ogg check to AFTER ogg file has been opened!
* Added play cursor reset for non-seekable ogg's in stop() - NOTE:- closes and reopens file so will likely cause a delay, use with caution.
* Cleaned up unnecessary file pointers
* Cleaned up ov_time_seek() usage for non-seekable ogg's.


Enjoy! :D

stickymango

30-04-2009 11:35:31

Update ( includes an interface breaking change to OgreOggSoundListener ):

* Added some mute functions to OgreOggSoundManager
* Removed setListenerVolume()/getListenerVolume() from OgreOggSoundListener class. Use OgreOggSoundManager:: setMasterVolume()/getMasterVolume() instead.

stickymango

23-06-2009 12:24:36

:!: Update to SVN :!: :

* Added Ogre::MemoryManager support throughout library to help with memory leaks, subsequently...
* Plugged two memory leaks ( Queued sounds list and shared buffers list )

Shall remain in SVN until proved stable, :!: note you will need to recompile OgreMain debug build, with the appropriate flag set, to activate the memory tracking..

xadh00m

23-06-2009 22:13:58

Great! Thanks for this update stickymango!
I really appreciate your effort to create and maintain this lib.

Thank you!

xad

stickymango

24-06-2009 09:28:18

No problem, glad its of some use to other people too :)

stickymango

24-06-2009 16:49:10

* Added an Eihort version of the latest library to the File Release system on the sourceforge site for anybody running 1.4.x version of OGRE..
* Added an SVN repository for said version here: http://ogreoggsound.svn.sourceforge.net/svnroot/ogreoggsound/branches/Eihort

Vectrex

25-06-2009 15:13:39

Hi, I've been using OOS and it's working nicely.
A few queries
- The ISound velocity parameter seems to only be set in the init method. But the setVelocity method sets the variable but doesn't actually set it :)
- mLocalTransformDirty not used?
- Does the listener have velocity setting somewhere? I can't find it but I presume it'd be something like this
void OgreOggListener::setVelocity( float velx, float vely, float velz )
{
mVelocity.x = x;
mVelocity.y = y;
mVelocity.z = z;
alListener3f(AL_VELOCITY,x,y,z);
}

void OgreOggListener::setVelocity( const Ogre::Vector3 &velocity)
{
mVelocity = velocity;
alListener3f(AL_VELOCITY, velocity.x, velocity.y, velocity.z);
}


- I THINK there might be a thread related crash bug with setting pitch. At least, I hear a little skid sound right before I set the pitch of the sound. The reason I think it's thread related is because this only happens occasionaly and randomly it seems.

stickymango

25-06-2009 15:16:18

hmmm, I'll look into those... :?

Vectrex

25-06-2009 15:30:26

thanks :)
one point about the pitch. If it works then it never crashes. It will only seem to crash on the first use of it.
Here's the update code. It's hacked debug stuff at the moment but still :)
if (totalSkid>0.1f)
{
skidSound->play();
skidSound->setVolume(clamp(totalSkid/2.0f,0.01f, 1.0f));
skidSound->setPitch(clamp(0.75f + totalSkid/5.0f, 0.1f, 1.4f));
}
else
skidSound->stop();

stickymango

25-06-2009 15:42:29

Thanks for the code, I've fixed the setVelocity() issues and added those functions to the listener now. :oops:

I'm confused how setPitch can cause a random crash but I'm going to investigate it now. Do you know if its a particular type of sound ( streamed / non-streamed ) is the sound in your test a looped static sound? :?

Thanks for your help! :)

Vectrex

25-06-2009 16:12:10

is the sound in your test a looped static sound? :?

it's a wav, not streamed, looped and preBuffered
This sound is the only one I do any pitching on. I start and stop lots of other sounds, but they don't pitch.
I start an ambient sound before this skid sound which has never crashed. Only when the first skid sound triggers.

edit: I guess since it's not streamed it wouldn't even be using another thread? Hmm. It's not just my computer either as I've tested it on a few different ones. Oddly, it seems one computer crashes quite often, but others might not at all, or rarely (like mine)

edit 2: If you can't see anything obvious then I'll try and reproduce it outside of my app, using the OOS demo.

stickymango

25-06-2009 16:18:21

I did a quick test with a single sound which I raise / lower the pitch on over time using your snippet, it works fine, is the snippet you posted called every frame?

Are you certain its linked to the setPitch() call and not play/stop? The reason I ask is if you are stopping/starting sounds simultaneously they will be releasing/requesting sources and maybe its in that code that its crashing..

Can you try rebuilding without threads and see if that fixes it?

[edit] yes it would still use the second thread to call its update function and queue actions etc..

stickymango

26-06-2009 20:45:02

* Fixed crash in createSound() for .wav sounds.

irado

24-08-2009 14:13:44

Hi,

I am trying build OgreOggSound 1.09 whitout thread and without boost, with Visual 2008, Ogre 1.6.3. I follow the steps this thread viewtopic.php?f=19&t=8389, and I use Pre-compiled zip archive. When I try build show the messages:


.\src\OgreOggSoundManager.cpp(211) : error C2259: 'OgreOggSound::OgreOggListener' : cannot instantiate abstract class
1> due to following members:
1> 'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
1> c:\OgreSDK\include\OgreMovableObject.h(484) : see declaration of 'Ogre::MovableObject::visitRenderables'
1>.\src\OgreOggSoundManager.cpp(457) : error C2259: 'OgreOggSound::OgreOggStreamSound' : cannot instantiate abstract class
1> due to following members:
1> 'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
1> c:\OgreSDK\include\OgreMovableObject.h(484) : see declaration of 'Ogre::MovableObject::visitRenderables'
1>.\src\OgreOggSoundManager.cpp(459) : error C2259: 'OgreOggSound::OgreOggStaticSound' : cannot instantiate abstract class
1> due to following members:
1> 'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
1> c:\OgreSDK\include\OgreMovableObject.h(484) : see declaration of 'Ogre::MovableObject::visitRenderables'
1>.\src\OgreOggSoundManager.cpp(502) : error C2259: 'OgreOggSound::OgreOggStreamWavSound' : cannot instantiate abstract class
1> due to following members:
1> 'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
1> c:\OgreSDK\include\OgreMovableObject.h(484) : see declaration of 'Ogre::MovableObject::visitRenderables'
1>.\src\OgreOggSoundManager.cpp(504) : error C2259: 'OgreOggSound::OgreOggStaticWavSound' : cannot instantiate abstract class
1> due to following members:
1> 'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
1> c:\OgreSDK\include\OgreMovableObject.h(484) : see declaration of 'Ogre::MovableObject::visitRenderables'
1>OgreOggSoundFactory.cpp
1>OgreOggListener.cpp
1>OgreOggISound.cpp
1>Build log was saved at "file://c:\OgreSDK\ogreoggsound\Release\BuildLog.htm"
1>OgreOggSound - 5 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


What is the problem?

thanks

stickymango

25-08-2009 14:54:09

Looks like you have downloaded the EIHORT zip release not the SHOGGOTH zip release, make sure you use SHOGGOTH with 1.6.x versions of OGRE.

[EDIT] Hmmm, bugger, looks like the changes to sourceforge have messed up the download links, make sure you click the 'view all files' button and download the ogreoggsound_v1_09.zip file...

sorry for that,

I shall attempt to correct the download link now..

stickymango

25-08-2009 16:23:53

* Fixed download link error

irado

26-08-2009 00:35:02

Thank you very much. Now I build the files OgreOggSound.dll and OgreOggSound, but show one error message yet.

1
>Linking...
1> Creating library C:\OgreSDK\ogreoggsound\Release\OgreOggSound.lib and object C:\OgreSDK\ogreoggsound\Release\OgreOggSound.exp
1>Generating code
1>Finished generating code
1>Embedding manifest...
1>Performing Post-Build Event...
1>O sistema não pode encontrar o caminho especificado.
1> 0 arquivo(s) copiado(s).
1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."
1>Build log was saved at "file://c:\OgreSDK\ogreoggsound\Release\BuildLog.htm"


I think that could help you.

stickymango

26-08-2009 09:14:03

Hi,

That error is okay, the library has successfully built so you can use it, that error stems from a post-build event I use to copy the lib dll into a testdemo folder I use, you can disable it in the project properties under: Project Properties --> Configuration properties --> Build Events --> Post build events.

irado

26-08-2009 11:11:17

Ok, thanks for informations.

stickymango

02-09-2009 15:55:26

:!: Update: Interface breaking changes: :!:

* Forced sound control functions to be called through OgreOggSoundManager, now use playSound()/pauseSound()/stopSound() functions to manage sounds.
* getSound() retrieves a pointer to a sound for property setting/querying only.
* Added fadeSound() to OgreOggSoundManager.
* Added setSoundCurrentTime() to OgreOggSoundManager.

The above is a result of a bug which caused pausing when stopping/pausing/playing sounds in multi-threaded mode due to mutex locking. Hopefully this update eliminates this. NOTE:- non-BOOST versions of the library shouldn't be affected by this bug, however changes to getSound()->play() etc.. will still be required.

Latest version available through SVN only at present.

Thanks.

stickymango

03-09-2009 16:38:44

:!: Update

* Added disable3D() to allow switchable spatialisation on mono sounds.
* Synchronised EIHORT / SHOGGOTH versions to benefit from all updates so far.

available in SVN only.

stickymango

10-09-2009 00:17:26

:!: Major overhaul commited :!:

* Major re-write commited to improve multi-threaded performance ( Revision 209 )
* Majority of functions implemented as non-blocking
* Testers required to prove stability ( need a good variety of test scenarios )
* Subject to optimisation and/or change during testing.


Feedback much appreciated, treat as potentially unstable in multi-threaded mode, non multi-threaded mode should remain as-is.

Thanks.

Lf3THn4D

10-09-2009 14:23:13

Awesomeness! Checking out now :D

[edit]
About your usage of the sleep and yield in the thread loop, I suggest you drop yield and use the boost thread's sleep function.
boost::this_thread::sleep(boost::posix_time::millisec(10));

Typically you don't need yield unless your thread is processing something really really long and you need to "cut" in between the processing to allow other threads to run. Also, sleep will basically stop the current thread and allow other threads to do their stuffs. Hence works better than yield. As for how long to sleep, I'm not exactly sure what is best but I assume a hundredth of a second should be pretty good. We won't be able to detect any lag in that case I think.
[/edit]

stickymango

10-09-2009 16:11:31

Sounds fine to me.

stickymango

11-09-2009 16:42:13

Bug fix:

* _loadImpl() wasn't setting prebuffer flag so all sounds were being prebuffered - fixed
* Prebuffering a streamed sound caused it to only play first buffer repeatedly - fixed


SVN Updated

stickymango

16-09-2009 11:54:45

SVN update:

* Fixed - crash in wav sounds with 'fact' / 'cue' etc chunks.
* Added a delayed actions list for when queuing a sound request fails.
* Added an optional parameter for specifying a desired action list size

stickymango

16-09-2009 16:55:57

SVN Update:

* Rewrote WAV load functions to be more efficient and robust (should now handle multiple CHUNK definitions correctly)
* Removed some stray vars in static wav class
* Fixed minor bug in streamed sounds causing repeating after being restarted

(If a streamed buffer ran out of audio before being updated it is stopped which resets the play position to beginning of the buffers, therefore when restarted the same section of audio was being played again before carrying on, now the played buffers are cleared and filled with new audio data before being restarted).

Enjoy! :)

stickymango

25-09-2009 23:52:25

SVN update:

* Fixed - streamed wav sound inaudible when played.

stickymango

30-09-2009 10:33:24

SVN update (REV. 235):

* Multiple bug fixes and improvments

Main area is in source management and multi-threaded actions, see changelog for full details.

Enjoy, :)

stickymango

15-10-2009 16:22:23

Significant update to SVN (Rev. 238):

* Added support for temporary sounds. http://www.ogre3d.org/addonforums/viewtopic.php?f=19&t=11128
* Fixed a number of bugs relating to source management

See changelog for details.

Any issues pipe up! :D

stickymango

05-11-2009 21:36:59

* Synchronised EIHORT branch with latest bug fixes

stickymango

20-11-2009 14:14:11

Code cleanup update:

* Removed TestDemo project from SVN and download, it can be made available on request
* Removed unnecessary ogg/vorbis files
* Removed release/debug folders
* Created a dependencies folder for ogg/vorbis libs
* Created a lib folder for output libs/dll's (NOTE:- you will need to adjust your project path to point to lib instead of [release] | [debug])


Any probs, shout up!

stickymango

10-02-2010 21:50:21

SVN Update:

* Added linux compatibility ammendments
* Prebuilt libs compiled with VC9 instead of VC8

stickymango

24-02-2010 23:34:31

SVN update:

* Fixed crash when using EFX effects in multithreaded mode
* Cleanup of warnings
* Suppressed warnings from vorbis files
* Setup paths for OGRE 1.7 (tested)
* Removed prebuilt libs


Enjoy!

stickymango

10-03-2010 20:33:41

SVN update:

* Significant change to the way sounds are created, now all sounds are created through the SceneManager which should eliminate problems with external destruction of sounds.
* Added a listener interface to track per-sound notifications
* Fixed crash caused by unintialised variables in stopAllSounds()
* Added isMono() convenience function for determining audio format.
* Lib should be instantiated through the loadPlugin() function NOT directly


See changelog for more info.

Enjoy!

stickymango

29-07-2010 00:03:07

SVN Update:

* Bug fixed callback error in OgreOggSoundStatic
* Added POCO threading support

stickymango

03-09-2010 12:28:14

SVN Update rev 340:

* Fixed broken Listener object (Threaded version)

stickymango

08-09-2010 14:30:15

SVN Update:

* Fixed bug in threaded lib regarding stopAllSounds()/pauseAllSounds()/resumeAllPausedSounds() cueing up unnecessary calls and causing non-playing audio.

stickymango

09-09-2010 10:38:06

SVN Update:

* Fixed plugin loopholes: checks added to catch unitialised plugin
* Added createListener() function to recreate a listener object after a clearScene() call
* Corrected listener MovabaleType string: 'OgreOggISound'


Thanks.

stickymango

22-09-2010 13:27:06

SVN Update(352):

* Fixed crash in destroyAllSounds()
* Reworked destruction of sounds to stop thread crash issues

stickymango

15-10-2010 22:54:12

SVN update:

* Added patch from torrque to support MinGW and openal-soft, also cleaned up CMakeLists to check for dependencies and act appropriately
* Only MSVC tested to work, if anyone comes across other platform issues please notify the community asap, thanks.
* viewtopic.php?f=19&t=13522&p=76021#p76021


Thanks

stickymango

09-11-2010 22:15:54

SVN update:

* Added patch from torrque to add mingw support
* Added getPlayPosition()
* Moved streaming sound loop callback trigger


Enjoy!

stickymango

30-11-2010 23:02:25

svn update:

* Fixed random crash bug in threaded lib when creating sounds.
* Fixed mutex locking of worker thread and main thread

stickymango

03-02-2011 21:35:15

Version 1.2 re-licensed to MIT.

stickymango

30-08-2012 22:28:05

Bug fixes in SVN

stickymango

02-04-2013 10:49:51

Updated zip and SVN with latest bug fixes.

shenjoku

14-01-2014 21:32:28

In case you haven't noticed, the version string in code is wrong. It still says "v1.22". It should be 1.24 now, right?

stickymango

04-06-2014 22:08:54

SVN patches commit for a number of multi-threaded related issues.

stickymango

31-07-2014 23:07:46

Latest revision 441.

stickymango

21-08-2017 22:08:39

Latest version is v1.27, support added for OGRE v2.1.