Class Sound¶
This class represents a sound that can be played. A sound is a WAV file that can be played on command via the method play. While some platforms may support MP3s, we can only guarantee that WAVs work on all platforms. In order for Kivy to find a WAV file, you should put it in the Sounds directory. Sounds in that folder can be referenced directly by name.
When a sound is played, it cannot be played again until it finishes, or is stopped. This means that if you want multiple, simultaneous sound effects from the same WAV file.you will need to create multiple Sound objects.
Constructor¶
-
Sound
(source)¶ Constructor: Loads a new sound from a file.
Parameter: source – The string providing the name of a sound file Precondition: source is the name of a valid sound file