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:
Nick Payne
2026-03-06 21:38:14 +00:00
parent 85975d6cc3
commit 65c2d58c82
2 changed files with 23 additions and 71 deletions
@@ -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] = []