< Gambas
Back to Gambas
Sound
There is no native sound class. You have to activate a component.
In the project properties menu, check a component like gb.sdl.sound
or gb.sdl2.audio
for using it.
After that, use the static class Music! Example:
PUBLIC SUB Button1_Click()
Music.Load("/path/to/your/file.mp3")
Music.Play()
END
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.