Skip to content

Commit

Permalink
Apply volume when creating a input node
Browse files Browse the repository at this point in the history
  • Loading branch information
levs42 committed Jun 7, 2024
1 parent e3288d1 commit ad35dac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/IO/IOAudioMixerByMultiTrack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ final class IOAudioMixerByMultiTrack: IOAudioMixerConvertible {
try mixerNode.enable(bus: UInt8(index), scope: .input, isEnabled: false)
}
}
for (bus, _) in tracks {
for (bus, track) in tracks {
try mixerNode.update(format: outputFormat, bus: bus, scope: .input)
var callbackStruct = AURenderCallbackStruct(inputProc: inputRenderCallback,
inputProcRefCon: Unmanaged.passUnretained(self).toOpaque())
try mixerNode.update(inputCallback: &callbackStruct, bus: bus)
try mixerNode.update(volume: 1, bus: bus, scope: .input)
try mixerNode.update(volume: track.settings.volume, bus: bus, scope: .input)
}
try mixerNode.update(format: outputFormat, bus: 0, scope: .output)
try mixerNode.update(volume: 1, bus: 0, scope: .output)
Expand Down

0 comments on commit ad35dac

Please sign in to comment.