sound

Playing sounds

sound.AudioPlayer

A wrapper of the AVAudioPlayer class of the AVFoundation framework.

sound.AudioPlayer.play

Plays the audio asynchronously.

sound.AudioPlayer.pause

Pauses the audio.

sound.AudioPlayer.stop

Stops the audio.

sound.AudioPlayer.playing

A boolean indicating whether the sound is playing.

sound.AudioPlayer.volume

The volume of the sound.

sound.AudioPlayer.current_time

The current time of the sound in seconds.

sound.play_file

Plays a file at given path.

Playing system sounds

sound.play_system_sound

Plays a system sound with given ID.

sound.play_beep

Plays a beep sound.

Frameworks

sound.AVFoundation

The AVFoundation system framework.

sound.AudioToolbox

The AudioToolbox system framework.