FScreenAudioParameters
共享屏幕流的音频配置。
C++
USTRUCT(BlueprintType)
struct FScreenAudioParameters {
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenAudioParameters")
int sampleRate = 16000;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenAudioParameters")
int channels = 2;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenAudioParameters")
int captureSignalVolume = 100;
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
FScreenAudioParameters(){}
FScreenAudioParameters(const agora::rtc::ScreenAudioParameters & AgoraData){
sampleRate = AgoraData.sampleRate;
channels = AgoraData.channels;
captureSignalVolume = AgoraData.captureSignalVolume;
}
agora::rtc::ScreenAudioParameters CreateAgoraData() const {
agora::rtc::ScreenAudioParameters AgoraData;
AgoraData.sampleRate = sampleRate;
AgoraData.channels = channels;
AgoraData.captureSignalVolume = captureSignalVolume;
return AgoraData;
}
void FreeAgoraData(agora::rtc::ScreenAudioParameters& AgoraData) const {
}
#endif
};
仅适用于 captureAudio 为 true
的场景。
sampleRate
音频采样率 (Hz)。默认值为 16000。
channels
声道数。默认值为 2,表示双声道。
captureSignalVolume
采集的系统音量。取值范围为 [0,100]。默认值为 100。