[Design Discussion] Buffer deletion exception notifications.


17-03-2009 21:05:19

I'm thinking about moving the buffer exception notification code to the SoundManager destructor. This is the code which produces:
OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in ~Sound
and occurs because not-the-last user of a piggy-backed buffer has destructed. In other words, if you have five sounds using a buffer and you delete these in turn, you will get four of these messages. During the operation of the library it's rather annoying, and with a significant use of audio it can become overwhelming. I personally think that it would be wise to move this to when the sound manager is destroyed. There is a big semantic difference here in that it is perfectly legitimate for a buffer to stay alive if other sounds are using it, whereas if the SoundManager instance is being destroyed, you're obviously no longer interested in using the library, in which case buffers that cannot be deleted *then* are a true worrisome exception. Comments? Suggestions?