Created
January 4, 2015 21:21
-
-
Save nwidger/e1dafc6aacf11adf7831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build !sdl | |
package nes | |
import ( | |
"azul3d.org/native/al.v1" | |
) | |
type Azul3DAudio struct { | |
input chan int16 | |
} | |
func NewAudio(frequency int, sampleSize int) (audio *Azul3DAudio, err error) { | |
var device *al.Device | |
_ = device | |
device, err = al.OpenDevice("", nil) | |
if err != nil { | |
return | |
} | |
return &Azul3DAudio{ | |
input: make(chan int16, 100000), | |
}, nil | |
} | |
func (audio *Azul3DAudio) Input() chan int16 { | |
return audio.input | |
} | |
func (audio *Azul3DAudio) Run() { | |
for { | |
<-audio.input | |
} | |
} | |
func (audio *Azul3DAudio) TogglePaused() { | |
} | |
func (audio *Azul3DAudio) Close() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment