Update streams in reverse order so that they can dispose of themselves
safely. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4116 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -120,8 +120,10 @@ public class SoundManager
|
|||||||
*/
|
*/
|
||||||
public void updateStreams (float time)
|
public void updateStreams (float time)
|
||||||
{
|
{
|
||||||
for (Stream stream : _streams) {
|
// iterate backwards through the list so that streams can dispose of
|
||||||
stream.update(time);
|
// themselves during their update
|
||||||
|
for (int ii = _streams.size() - 1; ii >= 0; ii--) {
|
||||||
|
_streams.get(ii).update(time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user