FLocalAudioStats
本地音频统计数据。
C++
USTRUCT(BlueprintType)
struct FLocalAudioStats
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int numChannels = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int sentSampleRate = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int sentBitrate = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int internalCodec = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int txPacketLossRate = 0; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int audioDeviceDelay = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int audioPlayoutDelay = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int earMonitorDelay = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAudioStats")
int aecEstimatedDelay = 0;
FLocalAudioStats(){}
FLocalAudioStats(const agora::rtc::LocalAudioStats & AgoraData){
numChannels = AgoraData.numChannels;
sentSampleRate = AgoraData.sentSampleRate;
sentBitrate = AgoraData.sentBitrate;
internalCodec = AgoraData.internalCodec;
txPacketLossRate = AgoraData.txPacketLossRate;
audioDeviceDelay = AgoraData.audioDeviceDelay;
audioPlayoutDelay = AgoraData.audioPlayoutDelay;
earMonitorDelay = AgoraData.earMonitorDelay;
aecEstimatedDelay = AgoraData.aecEstimatedDelay;
}
agora::rtc::LocalAudioStats CreateAgoraData() const {
agora::rtc::LocalAudioStats AgoraData;
AgoraData.numChannels = numChannels;
AgoraData.sentSampleRate = sentSampleRate;
AgoraData.sentBitrate = sentBitrate;
AgoraData.internalCodec = internalCodec;
AgoraData.txPacketLossRate = txPacketLossRate;
AgoraData.audioDeviceDelay = audioDeviceDelay;
AgoraData.audioPlayoutDelay = audioPlayoutDelay;
AgoraData.earMonitorDelay = earMonitorDelay;
AgoraData.aecEstimatedDelay = aecEstimatedDelay;
return AgoraData;
}
void FreeAgoraData(agora::rtc::LocalAudioStats & AgoraData) const {
}
};
numChannels
声道数。
sentSampleRate
发送本地音频的采样率,单位为 Hz。
sentBitrate
发送本地音频的码率平均值,单位为 Kbps。
txPacketLossRate
弱网对抗前本端到声网边缘服务器的丢包率 (%)。
internalCodec
内部的 payload 类型。
audioDeviceDelay
播放或录制音频时,音频设备模块的延迟 (ms)。
earMonitorDelay
耳返延迟 (ms),即声音从麦克风输入到耳机输出的延迟。
aecEstimatedDelay
回声消除延迟 (ms),即回声消除 (Acoustic Echo Cancellation, AEC) 模块测算出音频在本地播放前与被本地采集后的信号延迟。