package
module
Version:
v0.0.0-...-806d990
Opens a new window with list of versions in this module.
Published: Apr 17, 2019
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
SDL2 bindings
To play WAV:
package main
import (
"github.com/dgorohov/sdl-bindings"
"github.com/dgorohov/sdl-bindings/audio/wav"
"log"
"os"
"path/filepath"
)
func main() {
sdl.Init(sdl.SDL_AUDIO)
defer sdl.Quit()
path, err := filepath.Abs(os.Args[1])
if err != nil {
panic(err)
}
log.Printf("Playing WAV: %s\n", path)
if err := wav.PlayWAV(path); err != nil {
panic(err)
}
}
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.