-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from alta/ydnar/swift-format
chore: switch to Apple swift-format
- Loading branch information
Showing
16 changed files
with
104 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/swift.yaml" | ||
- ".gitmodules" | ||
- "**.swift" | ||
- "Package.resolved" | ||
- "Sources/Copus" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/swift.yaml" | ||
- ".gitmodules" | ||
- "**.swift" | ||
- "Package.resolved" | ||
- "Sources/Copus" | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: macos-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Test | ||
run: swift test | ||
|
||
- name: Generate release build | ||
run: swift build -c release |
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,13 @@ | ||
{ | ||
"version": 1, | ||
"lineLength": 2048, | ||
"indentation": { | ||
"tabs": 1 | ||
}, | ||
"tabWidth": 4, | ||
"maximumBlankLines": 1, | ||
"respectsExistingLineBreaks": true, | ||
"lineBreakBeforeControlFlowKeywords": true, | ||
"lineBreakBeforeEachArgument": false, | ||
"prioritizeKeepingFunctionOutputTogether": true | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import AVFoundation | ||
|
||
public extension AVAudioFrameCount { | ||
extension AVAudioFrameCount { | ||
// Opus can encode packets as small as 2.5ms at 8khz (20 samples) | ||
static let opusMin: Self = 20 | ||
public static let opusMin: Self = 20 | ||
|
||
// Opus can encode packets as large as to 120ms at 48khz (5760 samples) | ||
static let opusMax: Self = 5760 | ||
public static let opusMax: Self = 5760 | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
public extension Double { | ||
static let opus8khz: Self = 8000 | ||
static let opus12khz: Self = 12000 | ||
static let opus16khz: Self = 16000 | ||
static let opus24khz: Self = 24000 | ||
static let opus48khz: Self = 48000 | ||
extension Double { | ||
public static let opus8khz: Self = 8000 | ||
public static let opus12khz: Self = 12000 | ||
public static let opus16khz: Self = 16000 | ||
public static let opus24khz: Self = 24000 | ||
public static let opus48khz: Self = 48000 | ||
} |
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
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import AVFoundation | ||
import CoreAudio | ||
|
||
@_exported import Copus | ||
import CoreAudio | ||
|
||
public enum Opus: CaseIterable {} |
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