Jump to content

Gambas/Sound

From Wikibooks, open books for an open world

Back to Gambas

Sound

[edit | edit source]

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