Skip to content

Add multi-channel audio support#11

Merged
jcavar merged 1 commit intomainfrom
feature/multi-channel-audio-support
Feb 10, 2026
Merged

Add multi-channel audio support#11
jcavar merged 1 commit intomainfrom
feature/multi-channel-audio-support

Conversation

@jcavar
Copy link
Collaborator

@jcavar jcavar commented Jan 14, 2026

Preserve channel layout during quantization for audio with more than 2 channels. Previously, the quantization step would lose channel layout information, causing issues with multi-channel audio comparison.

Also adds a 4-channel audio test and refactors buffer creation helpers to support arbitrary channel counts.

Preserve channel layout during quantization for audio with more than 2 channels.
Previously, the quantization step would lose channel layout information, causing
issues with multi-channel audio comparison.

Also adds a 4-channel audio test and refactors buffer creation helpers to support
arbitrary channel counts.
@jcavar jcavar requested review from Copilot and hhrvoic January 14, 2026 10:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for multi-channel audio (more than 2 channels) by preserving channel layout information during the quantization process. Previously, channel layout was lost during quantization, which caused issues when comparing multi-channel audio.

Changes:

  • Modified quantization logic to preserve channel layout for buffers with more than 2 channels
  • Refactored buffer creation helpers to support arbitrary channel counts with proper layout handling
  • Added a new test case for 4-channel audio comparison

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
Tests/AudioSnapshotTestingTests/AudioSnapshotTestingTests.swift Added 4-channel test case and refactored buffer creation to support multi-channel audio with flexible sample rates
Sources/AudioSnapshotTesting/Internal/AudioDataComparator.swift Updated quantization to preserve channel layout for multi-channel audio buffers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jcavar jcavar merged commit 363f2be into main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants