CaseyB
21-01-2007 17:45:38
I am going to continue the thread from the Main forum so I thought I would quote it here.
Last night I committed code that takes the first step in managing resources but ensuring that only one copy of a sound file is ever loaded. If there is already a buffer loaded that for a particular file on disk. This way you can have a walk sound for your game and attach a copy to each player, but each copy will be pointing to the same buffer. You don't need to do anything to leverage this, it's all taken care of by the SoundManager!
I have removed the dependency on the SceneManager!! So now you can clear the scene, switch SceneManagers, or even have the SceneManager go away totally and you can still play music and sounds uninterrupted! I have also updated the demos to reflect this change. These changes are in SVN right now as I am working toward v0.3.
The next step is to take take the first step towards resource management but managing the buffers used my Sounds. This means that soon you can make as many sounds of the same type as you like, but there will only ever be a single buffer in memory. I am not going to be able to do this for SoundStreams though. The sheer nature of streaming audio means that I will never know what part of a file in in the buffer at any given moment and I wouldn't be able to swap the buffers out freely if they were being pointed to by multiple sources.
Last night I committed code that takes the first step in managing resources but ensuring that only one copy of a sound file is ever loaded. If there is already a buffer loaded that for a particular file on disk. This way you can have a walk sound for your game and attach a copy to each player, but each copy will be pointing to the same buffer. You don't need to do anything to leverage this, it's all taken care of by the SoundManager!