-
Notifications
You must be signed in to change notification settings - Fork 8
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 #235 from shiguredo/feature/swift-format-default
swift-format をデフォルト設定で利用するように変更 & フォーマット適用
- Loading branch information
Showing
41 changed files
with
6,079 additions
and
6,149 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
import Foundation | ||
|
||
private let descriptionTable: PairTable<String, AudioCodec> = | ||
PairTable( | ||
name: "AudioCodec", | ||
pairs: [ | ||
("default", .default), | ||
("OPUS", .opus), | ||
("PCMU", .pcmu), | ||
]) | ||
PairTable( | ||
name: "AudioCodec", | ||
pairs: [ | ||
("default", .default), | ||
("OPUS", .opus), | ||
("PCMU", .pcmu), | ||
]) | ||
|
||
/// 音声コーデックを表します。 | ||
public enum AudioCodec { | ||
/** | ||
/** | ||
サーバーが指定するデフォルトのコーデック。 | ||
現在のデフォルトのコーデックは Opus です。 | ||
*/ | ||
case `default` | ||
case `default` | ||
|
||
/// Opus | ||
case opus | ||
/// Opus | ||
case opus | ||
|
||
/// PCMU | ||
case pcmu | ||
/// PCMU | ||
case pcmu | ||
} | ||
|
||
extension AudioCodec: CustomStringConvertible { | ||
/// 文字列表現を返します。 | ||
public var description: String { | ||
descriptionTable.left(other: self)! | ||
} | ||
/// 文字列表現を返します。 | ||
public var description: String { | ||
descriptionTable.left(other: self)! | ||
} | ||
} | ||
|
||
/// :nodoc: | ||
extension AudioCodec: Codable { | ||
public init(from decoder: Decoder) throws { | ||
self = try descriptionTable.decode(from: decoder) | ||
} | ||
public init(from decoder: Decoder) throws { | ||
self = try descriptionTable.decode(from: decoder) | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
try descriptionTable.encode(self, to: encoder) | ||
} | ||
public func encode(to encoder: Encoder) throws { | ||
try descriptionTable.encode(self, to: encoder) | ||
} | ||
} |
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
Oops, something went wrong.