Mute the alarm sound without ack it


chanchungfat

Recommended Posts

If you want to stop it early, you can't use the built in sound parameter of the alarm. Instead, you should use system.sound.play() from the Fire event of each alarm to trigger the sound. Then you can use system.sound.stop() to manually stop it at any time.

Link to comment
Share on other sites

Thank you for reply.

Yes, we did try the way suggested and two problems come:

1. We assign the "ding.wav" in the fire event and we do hear a "ding" when the alarm fires. But the "ding" comes with a great time lag. It lags more then 15 seconds.

Code-

system.sound.play("c:\windows\media\ding.wav")

2. A single "ding" is not exactly we want, a continuous "ding" is required. We add codes like this:

Code-

while(1)

system.sound.play("c:\windows\media\ding.wav")

delay(0.5)

endwhile

The system hangs after the first "ding".

We can't proceed to test function system.sound.stop() because the system hangs at the first run.

Something have we done wrong?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.