IntdashAudioDecoder
open class IntdashAudioDecoder : NSObject, AACDecoderDelegate, OpusDecoderDelegate
音声用のデコーダークラス。
-
デコードに使用する音声のコーデック。
Declaration
Swift
public private(set) var codec: IntdashAudioCodec
-
デコード用オプション。
Declaration
Swift
public private(set) var option: IntdashAudioDecoderOption
-
オブジェクトを識別するためのタグ。
Declaration
Swift
public var tag: Int
-
このクラスが使用する Delegate。
Declaration
Swift
public weak var delegate: IntdashAudioDecoderDelegate?
-
ログレベル。
Declaration
Swift
public var logLevel: IntdashMediaLogLevel { get set }
-
AAC用デコーダー。
Declaration
Swift
public var aacDecoder: IntdashAudioDecoder.AACDecoder?
-
Opus用デコーダー。
Declaration
Swift
public var opusDecoder: IntdashAudioDecoder.OpusDecoder?
-
IntdashAudioDecoder を生成します。
Declaration
Swift
public init(codec: IntdashAudioCodec, option: IntdashAudioDecoderOption = IntdashAudioDecoderOption())
Parameters
codec
使用するコーデック
option
デコーダー用のオプション
-
デコードするデータを渡します。
Declaration
Swift
public func append(sampleData: Data, timestamp: TimeInterval = -1)
Parameters
sampleData
エンコードされた音声サンプル
本フィールドに渡すべきデータの形式は、使用するコーデックにより異なります。timestamp
sampleData
に対応するタイムスタンプ
デコードが成功した際に、デコードされた音声サンプルとともにdelegate
に渡されます。 -
デコーダーをリセットします。
Declaration
Swift
public func reset()
-
デコーダーをリセットします。
Declaration
Swift
public func reset(option: IntdashAudioDecoderOption)
Parameters
option
デコーダー用オプション
-
割り当てを解除します。
Declaration
Swift
public func dispose()
-
delegate のメソッド
AACDecoderDelegate.decodedSamples(_:sampleData:timestamp:)
を呼び出します。Declaration
Swift
public func decodedSamples(_ decoder: AACDecoder, sampleData: Data, timestamp: TimeInterval)
-
delegate のメソッド
AACDecoderDelegate.decodeFailedSampleData(_:error:)
を呼び出します。Declaration
Swift
public func decodeFailedSampleData(_ decoder: AACDecoder, error: NSError)
-
delegate のメソッド
OpusDecoderDelegate.decodedSamples(_:sampleData:timestamp:)
を呼び出します。Declaration
Swift
public func decodedSamples(_ decoder: OpusDecoder, sampleData: Data, timestamp: TimeInterval)
-
delegate のメソッド
OpusDecoderDelegate.decodeFailedSampleData(_:error:)
を呼び出します。Declaration
Swift
public func decodeFailedSampleData(_ decoder: OpusDecoder, error: NSError)
-
AAC用のデコーダークラス。
See moreDeclaration
Swift
public class AACDecoder : NSObject
-
Opus用のデコーダークラス。
See moreDeclaration
Swift
public class OpusDecoder : NSObject