AudioParams class
音频数据格式。
SDK 会通过 AudioParams 中的 samplesPerCall 、 sampleRate 和 channel 参数计算采样间隔,并根据该采样间隔触发 onRecordAudioFrame 、 onPlaybackAudioFrame 、 onMixedAudioFrame 和 onEarMonitoringAudioFrame 回调。 采样间隔 = samplesPerCall /(sampleRate × channel)。 请确保采样间隔不得小于 0.01 (s)。
- Annotations
-
- @JsonSerializable.new(explicitToJson: true, includeIfNull: false)
Properties
- channels → int?
-
数据的声道数,取值如下:
1:单声道(默认值)
2:双声道
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mode → RawAudioFrameOpModeType?
-
数据的使用模式。详见 RawAudioFrameOpModeType 。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → int?
-
数据的采样率,单位为 Hz,取值如下:
8000
16000(默认值)
32000
44100
48000
final
- samplesPerCall → int?
-
数据的采样点数,如旁路推流应用中通常为 1024。
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited