Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { // Setup runs initialization tasks for the audio engine. Setup() error // Teardown runs closing tasks for the audio engine to shut down gracefully. Teardown() error // Playing returns a bool if something is actively playing. // PlayingMusic and PlayingSound check specifically if music or sound // effects are currently playing. Playing() bool PlayingMusic() bool PlayingSound() bool // StopAll stops all music and sound effects. // StopMusic and StopSounds to selectively stop either the music or all // sound effects, respectively. StopAll() StopMusic() StopSounds() // LoadMusic opens a music file from disk and loads it into memory. // LoadMusicBin to load file by bytes in memory instead. LoadMusic(filename string) (Playable, error) LoadMusicBin(data []byte) (Playable, error) // LoadSound opens a sound effect file. // LoadSoundBin to load file by bytes in memory instead. LoadSound(filename string) (Playable, error) LoadSoundBin(data []byte) (Playable, error) }
Engine is a music and sound effects driver.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
play
Example program using the SDL2 Mix engine.
|
Example program using the SDL2 Mix engine. |
Package null implements a dummy audio driver that doesn't play any audio.
|
Package null implements a dummy audio driver that doesn't play any audio. |
Package sdl implements an audio engine using libSDL2.
|
Package sdl implements an audio engine using libSDL2. |
Click to show internal directories.
Click to hide internal directories.