// Detach and unlock all sounds void detachAll() { ManagedSound *s = list.getHead(); while(s) { ManagedSound *cur = s; s = s->next; cur->detach(); } }
// Update all sounds void updateAll() { ManagedSound *s = list.getHead(); while(s) { ManagedSound *cur = s; // Propagate first, since update() may delete object s = s->next; cur->update(); } }