[Solved]Play/Pause/Stop API


07-09-2009 15:08:02

I noticed the play pause stop API for sound has been set to protected mode to force the usage of SoundManager's methods. I think it's rather misleading and non OO friendly. Instead, why don't you force users to use the OgreOggISound interface for these commands and add a protected version of the methods as the real sound action implementation. E.G. playImpl(), stopImpl(), pauseImpl(). Then depending on the mode of use case, if it's threaded, it will push a queue request to the SoundManager. If it's non threaded, it'll simply just call the implementation methods.

In short, expose play/pause/stop blah that are sound source specific on the sound instance itself.

This way, the API would be more natural to use. Plus there won't be so much redundant string name matching to be done for each sound action.


07-09-2009 15:28:45

Yeah, I agree with you on the intuitive-ness of calling play/stop/pause from OgreOggISound, I only forced the issue so I could control the locking easier but I think I'll sort this out when I get round to re-jigging the multi-threaded version soon.


08-09-2009 04:54:21

Ok. Cool :)


10-09-2009 00:19:00

See: http://www.ogre3d.org/addonforums/viewtopic.php?f=19&t=8588&start=45

Feedback/comments/suggestions much appreciated.