Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin 450] update blueprint api to latest 4.5.0 #153

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4798,7 +4798,7 @@ struct FUABT_MixedAudioStream {
* @note Use this parameter only when the source type is `AUDIO_SOURCE_REMOTE`.
*/
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
FString channelName;
FString channelId;
/**
* The track ID of the local track.
* @note Use this parameter only when the source type is `AUDIO_SOURCE_REMOTE`.
Expand All @@ -4810,20 +4810,20 @@ struct FUABT_MixedAudioStream {
FUABT_MixedAudioStream(const agora::rtc::MixedAudioStream& AgoraData) {
sourceType = UABTEnum::WrapWithUE(AgoraData.sourceType);
remoteUserUid = AgoraData.remoteUserUid;
channelName = UTF8_TO_TCHAR(AgoraData.channelName);
channelId = UTF8_TO_TCHAR(AgoraData.channelId);
trackId = AgoraData.trackId;
}

agora::rtc::MixedAudioStream CreateRawData() const {
agora::rtc::MixedAudioStream AgoraData = UABTEnum::ToRawValue(sourceType);
AgoraData.remoteUserUid = remoteUserUid;
AgoraData.channelName = UABT::New_CharPtr(channelName);
AgoraData.channelId = UABT::New_CharPtr(channelId);
AgoraData.trackId = trackId;
return AgoraData;
}

void FreeRawData(agora::rtc::MixedAudioStream& AgoraData) const {
UABT::Free_CharPtr(AgoraData.channelName);
UABT::Free_CharPtr(AgoraData.channelId);
}

};
Expand All @@ -4841,7 +4841,7 @@ struct FUABT_LocalAudioMixerConfiguration {
* The source of the streams to mixed;
*/
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
TArray<FUABT_MixedAudioStream> sourceStreams;
TArray<FUABT_MixedAudioStream> audioInputStreams;

/**
* Whether to use the timestamp follow the local mic's audio frame.
Expand All @@ -4854,32 +4854,32 @@ struct FUABT_LocalAudioMixerConfiguration {
FUABT_LocalAudioMixerConfiguration() {}
FUABT_LocalAudioMixerConfiguration(const agora::rtc::LocalAudioMixerConfiguration& AgoraData) {
for (unsigned int i = 0; i < AgoraData.streamCount; i++) {
sourceStreams.Add(FUABT_MixedAudioStream(AgoraData.sourceStreams[i]));
audioInputStreams.Add(FUABT_MixedAudioStream(AgoraData.audioInputStreams[i]));
}
syncWithLocalMic = AgoraData.syncWithLocalMic;
}

agora::rtc::LocalAudioMixerConfiguration CreateRawData() const {
agora::rtc::LocalAudioMixerConfiguration AgoraData;
AgoraData.streamCount = sourceStreams.Num();
AgoraData.streamCount = audioInputStreams.Num();

int Num = sourceStreams.Num();
int Num = audioInputStreams.Num();

agora::rtc::MixedAudioStream* DstArray = static_cast<agora::rtc::MixedAudioStream*>(FMemory::Malloc(Num * sizeof(agora::rtc::MixedAudioStream)));

for (int i = 0; i < Num; ++i) {
agora::rtc::MixedAudioStream Tmp = sourceStreams[i].CreateRawData();
new (&DstArray[i]) agora::rtc::MixedAudioStream(Tmp.sourceType,Tmp.remoteUserUid,Tmp.channelName,Tmp.trackId);
agora::rtc::MixedAudioStream Tmp = audioInputStreams[i].CreateRawData();
new (&DstArray[i]) agora::rtc::MixedAudioStream(Tmp.sourceType,Tmp.remoteUserUid,Tmp.channelId,Tmp.trackId);
}

AgoraData.sourceStreams = DstArray;
AgoraData.audioInputStreams = DstArray;

AgoraData.syncWithLocalMic = syncWithLocalMic;
return AgoraData;
}

void FreeRawData(agora::rtc::LocalAudioMixerConfiguration& AgoraData) const {
UABT::Free_RawDataArray<agora::rtc::MixedAudioStream, FUABT_MixedAudioStream>(AgoraData.sourceStreams, AgoraData.streamCount);
UABT::Free_RawDataArray<agora::rtc::MixedAudioStream, FUABT_MixedAudioStream>(AgoraData.audioInputStreams, AgoraData.streamCount);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3237,28 +3237,31 @@ enum class EUABT_AUDIO_MIXING_REASON_TYPE : uint8 {
AUDIO_MIXING_REASON_OK = 0,

/** 701: The SDK cannot open the audio mixing file. */
AUDIO_MIXING_REASON_CAN_NOT_OPEN = 1,
AUDIO_MIXING_REASON_CAN_NOT_OPEN,
/** 702: The SDK opens the audio mixing file too frequently. */
AUDIO_MIXING_REASON_TOO_FREQUENT_CALL = 2,
AUDIO_MIXING_REASON_TOO_FREQUENT_CALL,
/** 703: The audio mixing file playback is interrupted. */
AUDIO_MIXING_REASON_INTERRUPTED_EOF = 3,
/** 715: The audio mixing file is played once. */
AUDIO_MIXING_REASON_ONE_LOOP_COMPLETED = 4,
/** 716: The audio mixing file is all played out. */
AUDIO_MIXING_REASON_ALL_LOOPS_COMPLETED = 5,
/** 716: The audio mixing file stopped by user */
AUDIO_MIXING_REASON_STOPPED_BY_USER = 6,
AUDIO_MIXING_REASON_INTERRUPTED_EOF,
/** 721: The audio mixing file is played once. */
AUDIO_MIXING_REASON_ONE_LOOP_COMPLETED,
/** 723: The audio mixing file is all played out. */
AUDIO_MIXING_REASON_ALL_LOOPS_COMPLETED,
/** 724: The audio mixing file stopped by user */
AUDIO_MIXING_REASON_STOPPED_BY_USER,
/** 726: The audio mixing playback has resumed by user */
AUDIO_MIXING_REASON_RESUMED_BY_USER
};


GEN_UABTFUNC_SIGNATURE_ENUMCONVERSION_7_ENTRIES(EUABT_AUDIO_MIXING_REASON_TYPE, agora::rtc::AUDIO_MIXING_REASON_TYPE,
GEN_UABTFUNC_SIGNATURE_ENUMCONVERSION_8_ENTRIES(EUABT_AUDIO_MIXING_REASON_TYPE, agora::rtc::AUDIO_MIXING_REASON_TYPE,
AUDIO_MIXING_REASON_OK,
AUDIO_MIXING_REASON_CAN_NOT_OPEN,
AUDIO_MIXING_REASON_TOO_FREQUENT_CALL,
AUDIO_MIXING_REASON_INTERRUPTED_EOF,
AUDIO_MIXING_REASON_ONE_LOOP_COMPLETED,
AUDIO_MIXING_REASON_ALL_LOOPS_COMPLETED,
AUDIO_MIXING_REASON_STOPPED_BY_USER)
AUDIO_MIXING_REASON_STOPPED_BY_USER,
AUDIO_MIXING_REASON_RESUMED_BY_USER)

/**
The states of the rhythm player.
Expand Down