Skip to content

Commit

Permalink
newDriver returns tryWriteCloser
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jun 19, 2019
1 parent 5407e1c commit 52110e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion driver_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ type driver struct {
bufferSize int
}

func newDriver(sampleRate, channelNum, bitDepthInBytes, bufferSizeInBytes int) (*driver, error) {
func newDriver(sampleRate, channelNum, bitDepthInBytes, bufferSizeInBytes int) (tryWriteCloser, error) {
p := &driver{
sampleRate: sampleRate,
channelNum: channelNum,
Expand Down
2 changes: 1 addition & 1 deletion driver_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type driver struct {

const audioBufferSamples = 3200

func newDriver(sampleRate, channelNum, bitDepthInBytes, bufferSize int) (*driver, error) {
func newDriver(sampleRate, channelNum, bitDepthInBytes, bufferSize int) (tryWriteCloser, error) {
class := js.Global().Get("AudioContext")
if class == js.Undefined() {
class = js.Global().Get("webkitAudioContext")
Expand Down
2 changes: 1 addition & 1 deletion driver_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func alsaError(err C.int) error {
return fmt.Errorf("oto: ALSA error: %s", C.GoString(C.snd_strerror(err)))
}

func newDriver(sampleRate, numChans, bitDepthInBytes, bufferSizeInBytes int) (*driver, error) {
func newDriver(sampleRate, numChans, bitDepthInBytes, bufferSizeInBytes int) (tryWriteCloser, error) {
p := &driver{
numChans: numChans,
bitDepthInBytes: bitDepthInBytes,
Expand Down

0 comments on commit 52110e3

Please sign in to comment.