-
Notifications
You must be signed in to change notification settings - Fork 45
/
hey.go
27 lines (25 loc) · 675 Bytes
/
hey.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import "openal"
import "time"
import "fmt"
func main() {
openal.Init();
// helloBuffer := openal.CreateBufferHelloWorld();
helloBuffer := openal.CreateBufferFromFile("welcome.wav");
helloSource := openal.GenSource();
helloSource.SetAttr(openal.AlBuffer, helloBuffer);
helloSource.Play();
time.Sleep(1*1000*1000*1000);
// just to test GenSources
someSources := make([]uint, 10);
fmt.Println(someSources);
openal.GenSources(someSources);
fmt.Println(someSources);
// just to test GenBuffers
buffers := openal.GenBuffers(7);
fmt.Println(buffers);
openal.DumpRegistries();
openal.DeleteBuffers(buffers);
openal.DumpRegistries();
openal.Exit();
}