Skip to content

Commit

Permalink
Rename createTrack to makeTrack
Browse files Browse the repository at this point in the history
  • Loading branch information
levs42 committed Mar 19, 2024
1 parent c8b84ec commit 44e506f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/IO/IOAudioMixer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ final class IOAudioMixer {
private var mixerNode: MixerNode?
private var outputNode: OutputNode?
private lazy var defaultTrack: Track = {
createTrack(channel: kIOAudioMixer_defaultResamplerTag, settings: settings.defaultResamplerSettings)
makeTrack(channel: kIOAudioMixer_defaultResamplerTag, settings: settings.defaultResamplerSettings)
}()

private let inputRenderCallback: AURenderCallback = { (inRefCon: UnsafeMutableRawPointer, _: UnsafeMutablePointer<AudioUnitRenderActionFlags>, _: UnsafePointer<AudioTimeStamp>, inBusNumber: UInt32, inNumberFrames: UInt32, ioData: UnsafeMutablePointer<AudioBufferList>?) in
Expand Down Expand Up @@ -124,7 +124,7 @@ final class IOAudioMixer {
track(channel: Int(channel))?.resampler.append(audioBuffer, when: when)
}

private func createTrack(channel: Int, settings: IOAudioResamplerSettings) -> Track {
private func makeTrack(channel: Int, settings: IOAudioResamplerSettings) -> Track {
let resampler = IOAudioResampler<IOAudioMixer>()
resampler.tag = channel
resampler.settings = settings
Expand All @@ -141,9 +141,9 @@ final class IOAudioMixer {
return track
} else if let sampleRate = outputFormat?.sampleRate, let channels = outputFormat?.channelCount {
if tracks[kIOAudioMixer_defaultResamplerTag] == nil {
_ = createTrack(channel: kIOAudioMixer_defaultResamplerTag, settings: settings.defaultResamplerSettings)
_ = makeTrack(channel: kIOAudioMixer_defaultResamplerTag, settings: settings.defaultResamplerSettings)
}
return createTrack(channel: channel,
return makeTrack(channel: channel,
settings: settings.resamplerSettings(channel: channel, sampleRate: sampleRate, channels: channels))
}
return nil
Expand Down

0 comments on commit 44e506f

Please sign in to comment.