We have the ability to control our sounds now that we can have them play in the simulator. If you think back to the days of cassette tape players, they had the ability to use functions such as pause, stop, and rewind. Corona's audio API library can do just that.
Stops playback on a channel and clears the channel so it can be played again.
Syntax:
audio.stop([channel])
or:
audio.stop([{channel = c}])
Parameters:
Having no parameters stops all active channels.
channel
- The channel to stop. Specifying 0 stops all channels.
This pauses playback on a channel and has no effect on channels that aren't playing.
Syntax:
audio.pause([channel])
or:
audio.pause([{channel = c}])
Parameters:
Having no parameters pauses all active channels.
channel
- The channel to pause. Specifying 0 pauses all channels.