AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds) { AUD_Reference<AUD_IFactory> silence = new AUD_SilenceFactory; AUD_Reference<AUD_IFactory> limiter = new AUD_LimiterFactory(silence, 0, seconds); AUD_device->lock(); try { AUD_Handle handle2 = AUD_device->play(limiter); if(!handle2.isNull()) { handle2->setStopCallback((stopCallback)pauseSound, handle); AUD_device->unlock(); return new AUD_Handle(handle2); } } catch(AUD_Exception&) { } AUD_device->unlock(); return NULL; }
void AUD_lock() { AUD_device->lock(); }