engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IVoiceEncoder类 参考abstract

Interface for encoding raw voice for transmission over the wire 更多...

#include <VoiceCodec.h>

+ 类 IVoiceEncoder 继承关系图:

Public 成员函数

virtual void Destroy ()=0
 Cleanup the encoder
 
virtual void DumpState () const =0
 Output the state of the encoder
 
virtual int32 Encode (const uint8 *RawPCMData, uint32 RawDataSize, uint8 *OutCompressedData, uint32 &OutCompressedDataSize)=0
 Encode a raw audio stream (expects 16bit PCM audio) 更多...
 
virtual bool Init (int32 SampleRate, int32 NumChannels, EAudioEncodeHint EncodeHint)=0
 Initialize the encoder 更多...
 
virtual void Reset ()=0
 Reset the encoder back to its initial state
 
virtual bool SetBitrate (int32 InBitRate)=0
 Adjust the encoding bitrate 更多...
 
virtual bool SetComplexity (int32 InComplexity)=0
 Adjust the encoding complexity (platform specific) 更多...
 
virtual bool SetVBR (bool bEnableVBR)=0
 Set the encoding to variable bitrate 更多...
 
- Public 成员函数 继承自 TSharedFromThis< IVoiceEncoder >
TSharedRef< IVoiceEncoder, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< IVoiceEncoder const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 

额外继承的成员函数

- Protected 成员函数 继承自 TSharedFromThis< IVoiceEncoder >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 
- 静态 Protected 成员函数 继承自 TSharedFromThis< IVoiceEncoder >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

Interface for encoding raw voice for transmission over the wire

成员函数说明

◆ Encode()

virtual int32 IVoiceEncoder::Encode ( const uint8 *  RawPCMData,
uint32  RawDataSize,
uint8 *  OutCompressedData,
uint32 &  OutCompressedDataSize 
)
pure virtual

Encode a raw audio stream (expects 16bit PCM audio)

参数
RawPCMDataarray of raw PCM data to encode
RawDataSizeamount of raw PCM data in the buffer
OutCompressedDatabuffer to contain encoded/compressed audio stream
OutCompressedDataSize[in/out] amount of buffer used to encode the audio stream
返回
number of bytes at the end of the stream that wasn't encoded (some interfaces can only encode at a certain frame slice)

◆ Init()

virtual bool IVoiceEncoder::Init ( int32  SampleRate,
int32  NumChannels,
EAudioEncodeHint  EncodeHint 
)
pure virtual

Initialize the encoder

参数
SampleRaterequested sample rate of the encoding
NumChannelnumber of channels in the raw audio stream
EncodeHinttype of audio that will be encoded
返回
true if initialization was successful, false otherwise

◆ SetBitrate()

virtual bool IVoiceEncoder::SetBitrate ( int32  InBitRate)
pure virtual

Adjust the encoding bitrate

参数
InBitRatenew bitrate value (bits/sec)
返回
true if successfully changed, false otherwise

◆ SetComplexity()

virtual bool IVoiceEncoder::SetComplexity ( int32  InComplexity)
pure virtual

Adjust the encoding complexity (platform specific)

参数
InComplexitynew complexity
返回
true if successfully changed, false otherwise

◆ SetVBR()

virtual bool IVoiceEncoder::SetVBR ( bool  bEnableVBR)
pure virtual

Set the encoding to variable bitrate

参数
bEnableVBRtrue to use variable bit rate, false to turn it off
返回
true if successfully changed, false otherwise

该类的文档由以下文件生成: