Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
References
| Module | OnlineSubsystemUtils |
| Header | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/VoicePacketBuffer.h |
| Include | #include "VoicePacketBuffer.h" |
Syntax
class FVoicePacketBuffer
Remarks
FVoicePacketBuffer This class is used to handle sorting of packets as they arrive. This class is intended to be thread safe, as long as PushPacket() nor PopAudio() are called by multiple threads.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FVoicePacketBuffer
(
int32 BufferSize, |
This is the only constructor that should be used with FVoicePacketBuffer. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| uint32 | DropOldestAudio
(
uint32 InNumSamples |
When called, will seek forward in the buffer by the requested number of samples, skipping and removing the audio we seek past. | |
| uint64 | Get whatever the most recent sample processed is for buffer-accurate timing. | ||
| int32 | This will return the current amount of samples buffered here. | ||
| bool | IsIdle () |
Whether we have idled out. This is used to automatically close the audio stream and free resources when unused. | |
| int32 | PopAudio
(
float* DestBuffer, |
Pop RequestedSamples of float samples into DestBuffer. | |
| void | PushPacket
(
const void* InBuffer, |
Push a new packet of decompressed audio onto the buffer to be consumed. | |
| void | Reset
(
int32 InStartSample |
Clears the buffer. |