🐛 Fix not using correct Port pointer in routing

- `&out` is only a pointer to a copy of the Port object that the for loop creates
- This results in `&out` always refering to the last processed list item instead of the specific port
This commit is contained in:
2024-02-28 23:43:19 +01:00
parent fb5d739a90
commit d1ca8d5d4b

View File

@ -144,8 +144,8 @@ func processJackCb(nframes uint32) int {
// Get memory addresses to write to for all outputs
var outputBuffers []JackOutputBuffers = []JackOutputBuffers{}
for _, out := range portConfig.Output {
outputBuffer := JackOutputBuffers{&out, [][]jack.AudioSample{}}
for i, out := range portConfig.Output {
outputBuffer := JackOutputBuffers{&portConfig.Output[i], [][]jack.AudioSample{}}
for _, port := range out.object {
buffer := port.GetBuffer(nframes)
for i := range buffer {