[go: up one dir, main page]

Skip to content

Commit

Permalink
Add default dispatch queue to prevent source break (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackYoustra authored Nov 23, 2023
1 parent dfb2d15 commit 6d22aea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/AudioKit/Taps/AmplitudeTap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class AmplitudeTap: BaseTap {
bufferSize: UInt32 = 1_024,
stereoMode: StereoMode = .center,
analysisMode: AnalysisMode = .rms,
callbackQueue: DispatchQueue,
callbackQueue: DispatchQueue = .main,
handler: @escaping (Float) -> Void = { _ in }) {
self.handler = handler
self.stereoMode = stereoMode
Expand Down
2 changes: 1 addition & 1 deletion Sources/AudioKit/Taps/FFTTap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ open class FFTTap: BaseTap {
public init(_ input: Node,
bufferSize: UInt32 = 4096,
fftValidBinCount: FFTValidBinCount? = nil,
callbackQueue: DispatchQueue,
callbackQueue: DispatchQueue = .main,
handler: @escaping Handler) {
self.handler = handler
if let fftBinCount = fftValidBinCount {
Expand Down
2 changes: 1 addition & 1 deletion Sources/AudioKit/Taps/RawBufferTap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ open class RawBufferTap: BaseTap {
/// - input: Node to analyze
/// - bufferSize: Size of buffer
/// - handler: Callback to call on each pcm buffer received
public init(_ input: Node, bufferSize: UInt32 = 4096, callbackQueue: DispatchQueue, handler: @escaping Handler) {
public init(_ input: Node, bufferSize: UInt32 = 4096, callbackQueue: DispatchQueue = .main, handler: @escaping Handler) {
self.handler = handler
super.init(input, bufferSize: bufferSize, callbackQueue: callbackQueue)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/AudioKit/Taps/RawDataTap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open class RawDataTap: BaseTap {
/// - input: Node to analyze
/// - bufferSize: Size of buffer to analyze
/// - handler: Callback to call when results are available
public init(_ input: Node, bufferSize: UInt32 = 1_024, callbackQueue: DispatchQueue, handler: @escaping Handler = { _ in }) {
public init(_ input: Node, bufferSize: UInt32 = 1_024, callbackQueue: DispatchQueue = .main, handler: @escaping Handler = { _ in }) {
self.data = Array(repeating: 0.0, count: Int(bufferSize))
self.handler = handler
super.init(input, bufferSize: bufferSize, callbackQueue: callbackQueue)
Expand Down

0 comments on commit 6d22aea

Please sign in to comment.