Back to Gambas

Sound

edit

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