[Feature] Two minor interface additions

shenjoku

07-05-2014 20:22:31

The first change is very simple and is just a change to make it easier to pass around a const Ogre::OgreOggISound object and still be able to retrieve data from it. The getPlayPosition() function is missing the const qualifier so it cannot be called on a const Ogre::OgreOggISound object, which is something I currently need to do. I've already added const to it and all derived versions and you can get the patch file here.

The second change is adding a new function to OgreOggISound that retrieves the full path to the sound file that was loaded, which I am going to use for saving/loading what sounds are playing as part of the game state. It's a simple one-liner inline function that just calls getName() on the mAudioStream object. If you have any suggestion for a better way to retrieve this information, or an existing method, then let me know; I couldn't find any existing functionality for this. The patch for this change is here.