OpusDecoder
public class OpusDecoder : NSObject
Opus用のデコーダークラス。
-
デコード時の音声フォーマットのデフォルト値(
.pcmFloat32)。Declaration
Swift
public static let DEFAULT_DECODE_FORMAT: IntdashAudioFormat -
デコード時のサンプリングレートのデフォルト値( 48000 )。
Declaration
Swift
public static let DEFAULT_DECODE_SAMPLE_RATE: Double -
デコード時の音声フォーマット。
Declaration
Swift
public let decodeFormat: IntdashAudioFormat -
デコード時のサンプリングレート。
Declaration
Swift
public let decodeSampleRate: Double -
オブジェクトを識別するためのタグ。
Declaration
Swift
public var tag: Int -
このクラスが使用する Delegate。
Declaration
Swift
public weak var delegate: OpusDecoderDelegate? -
このクラスが使用する Delegate。
Declaration
Swift
public weak var sampleParseDelegate: OpusDecoderSampleParseDelegate? -
入力に使用した音声フォーマット。
Declaration
Swift
public private(set) var inputFormatDesc: AudioStreamBasicDescription? { get } -
出力される音声フォーマット。
Declaration
Swift
public private(set) var outputFormatDesc: AudioStreamBasicDescription? { get } -
Opusヘッダー。
Declaration
Swift
public private(set) var opusHeader: OpusHeader? { get } -
OpusDecoder を生成します。
Declaration
Swift
public init(decodeFormat: IntdashAudioFormat = OpusDecoder.DEFAULT_DECODE_FORMAT, decodeSampleRate: Double = OpusDecoder.DEFAULT_DECODE_SAMPLE_RATE)Parameters
decodeFormatデコード時の音声フォーマット
decodeSampleRateデコード時のサンプルレート
-
OpusDecoder を生成します。
Declaration
Swift
public init(commonFormat: AVAudioCommonFormat, decodeSampleRate: Double = OpusDecoder.DEFAULT_DECODE_SAMPLE_RATE) throwsParameters
commonFormatデコード時の音声フォーマット
decodeSampleRateデコード時のサンプリングレート
-
デコードしたい音声サンプルを追加します。
Declaration
Swift
public func appendAudioSamples(sampleData: Data, timestamp: TimeInterval = -1)Parameters
sampleDataエンコードされた音声サンプル(Opusのフレーム)
timestampタイムスタンプ
-
初期状態にリセットします。
Declaration
Swift
public func reset() -
割り当てを解除します。
Declaration
Swift
public func dispose()
OpusDecoder Class Reference