Skip to content

Commit

Permalink
Don't use globals
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed May 27, 2023
1 parent 78fe8e8 commit a4f6da0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Sources/Audio/Nodes/Node+Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public extension Node {
}

var isStarted: Bool { !bypassed }
var outputFormat: AVAudioFormat { Settings.audioFormat }
var outputFormat: AVAudioFormat {
au.outputBusses[0].format
}

/// All parameters on the Node
var parameters: [NodeParameter] {
Expand Down
4 changes: 0 additions & 4 deletions Sources/Audio/Nodes/Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ public protocol Node: AnyObject {
/// Tells whether the node is processing (ie. started, playing, or active)
var isStarted: Bool { get }

/// Audio format to use when connecting this node.
/// Defaults to `Settings.audioFormat`.
var outputFormat: AVAudioFormat { get }

/// The underlying audio unit.
var au: AUAudioUnit { get }
}

0 comments on commit a4f6da0

Please sign in to comment.