From cf32f45902fdc1319f706f9854245500c871a336 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 14 Mar 2023 20:55:50 +0900 Subject: [PATCH] windows: bug fix: only one channel was played in multi-channel environments Closes #207 --- driver_wasapi_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver_wasapi_windows.go b/driver_wasapi_windows.go index 6d944e2..81ff11d 100644 --- a/driver_wasapi_windows.go +++ b/driver_wasapi_windows.go @@ -426,7 +426,7 @@ func (c *wasapiContext) writeOnRenderThread() error { for i := 0; i < int(frames); i++ { for j := 0; j < c.actualChannelCount; j++ { if j < c.channelCount { - c.bufForActualChannels[i*c.actualChannelCount+j] = c.buf[i*c.channelCount] + c.bufForActualChannels[i*c.actualChannelCount+j] = c.buf[i*c.channelCount+j] } else { c.bufForActualChannels[i*c.actualChannelCount+j] = 0 }