#include <PlayerVoiceComponent.h>
|
| void | PlayVoiceChat (const TArray< uint8 > &VoiceData, int32 SampleRate) |
| |
◆ PlayVoiceChat()
| void UPlayerVoiceComponent::PlayVoiceChat |
( |
const TArray< uint8 > & | VoiceData, |
|
|
int32 | SampleRate ) |
8{
9
10 USoundWaveProcedural* ProceduralSoundWave = NewObject<USoundWaveProcedural>();
11
12
13 ProceduralSoundWave->SetSampleRate(SampleRate);
14 ProceduralSoundWave->NumChannels = 1;
15 ProceduralSoundWave->Duration = INDEFINITELY_LOOPING_DURATION;
16 ProceduralSoundWave->SoundGroup = SOUNDGROUP_Voice;
17 ProceduralSoundWave->bLooping = false;
18 ProceduralSoundWave->bProcedural = true;
19
20
21 ProceduralSoundWave->QueueAudio(VoiceData.GetData(), VoiceData.Num());
22
23
24 SetSound(ProceduralSoundWave);
25 Play();
26
27
28}
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Public/ProximityChat/PlayerVoiceComponent.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Private/ProximityChat/PlayerVoiceComponent.cpp