remove unused append(_ data: Data) overload from AudioBuffer
Only one append path exists now: append(from:count:), which is what the IO proc callback uses. The Data-based overload had no callers in source and added a dead code path to maintain. Also resolves CoreAudio.AudioBuffer name collision in tests via typealias. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,16 +82,6 @@ public class AudioBuffer {
|
||||
availableBytes += count
|
||||
}
|
||||
|
||||
/// Appends audio data from a Data value. Delegates to the raw pointer
|
||||
/// path; prefer append(from:count:) when you already have a pointer to
|
||||
/// avoid creating a Data object.
|
||||
public func append(_ data: Data) {
|
||||
data.withUnsafeBytes { bytes in
|
||||
guard let baseAddress = bytes.baseAddress else { return }
|
||||
append(from: baseAddress, count: bytes.count)
|
||||
}
|
||||
}
|
||||
|
||||
/// Extracts all complete chunks currently available in the buffer.
|
||||
public func processChunks() -> [AudioPacket] {
|
||||
var packets: [AudioPacket] = []
|
||||
|
||||
Reference in New Issue
Block a user