The Delay class
- class audiomath.Delay(seconds, initialValue=False, finalValue=True)
Bases:
objectA callable object that can be assigned to one of the dynamic properties of a
Player. It returns itsinitialValueuntil the specified number ofsecondshas elapsed, then raises aStopIterationexception containing itsfinalValue. This will be caught by thePlayer, causing it to replace the dynamic with the specified final static value.The following example causes a
Playerobject to start playing automatically after a delay:import audiomath as am p = am.Player(am.TestSound('12'), synchronizeDynamics=False) p.playing = am.Delay(5) # will start playing 5 seconds from now