Skip to content

Commit

Permalink
darwin: Bug fix: Needed to update the written buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Sep 15, 2019
1 parent 41d0315 commit a693a9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion driver_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type driver struct {

var (
theDriver *driver
driverM sync.Mutex
driverM sync.Mutex
)

func setDriver(d *driver) {
Expand Down Expand Up @@ -160,6 +160,7 @@ func oto_render(inRefCon unsafe.Pointer,
*(*byte)(unsafe.Pointer(uintptr(ioData.mBuffers[0].mData) + uintptr(i))) = d.buf[i]
}
d.buf = d.buf[n:]
ioData.mBuffers[0].mDataByteSize = C.UInt32(n)

return C.noErr
}
Expand Down

0 comments on commit a693a9d

Please sign in to comment.