-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #2936 demonstrate bug * #2936 handle arbitrary channel counts * #2936 fix testReadFile * #2936 formatting
- Loading branch information
1 parent
de25aa2
commit c1de933
Showing
4 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Tests/AudioKitTests/Extension Tests/AVAudioFileTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import XCTest | ||
import AVFoundation | ||
|
||
final class AVAudioFileTests: XCTestCase { | ||
|
||
func testReadFile() throws { | ||
|
||
let sampleURL = Bundle.module.url(forResource: "TestResources/0001_1-16", withExtension: "wav")! | ||
|
||
let wavFile = try AVAudioFile(forReading: sampleURL) | ||
|
||
let pcmBuffer = wavFile.toAVAudioPCMBuffer()! | ||
|
||
XCTAssertEqual(Int(wavFile.length), Int(pcmBuffer.frameLength)) | ||
} | ||
|
||
} |
Binary file not shown.