Twitch SDK (Internal)
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ttv::broadcast::PcmAudioReceiver Class Reference

#include <pcmaudioframe.h>

Inheritance diagram for ttv::broadcast::PcmAudioReceiver:
ttv::broadcast::IPcmAudioFrameReceiver ttv::broadcast::IAudioFrameReceiver

Public Types

typedef size_t ReceiverTypeId
 

Public Member Functions

 PcmAudioReceiver (uint32_t numPcmSamplesPerFrame)
 
virtual TTV_ErrorCode GetNumPcmSamplesPerFrame (uint32_t &result) const override
 
virtual TTV_ErrorCode PackageFrame (const uint8_t *sampleBuffer, uint32_t numSamplesPerChannel, uint32_t numChannels, bool interleaved, AudioSampleFormat audioSampleFormat, uint64_t timeStamp, std::shared_ptr< AudioFrame > &result) override
 

Static Public Member Functions

static ReceiverTypeId GetReceiverTypeId ()
 

Private Attributes

uint32_t mNumPcmSamplesPerFrame
 

Member Typedef Documentation

◆ ReceiverTypeId

Constructor & Destructor Documentation

◆ PcmAudioReceiver()

ttv::broadcast::PcmAudioReceiver::PcmAudioReceiver ( uint32_t  numPcmSamplesPerFrame)

Member Function Documentation

◆ GetNumPcmSamplesPerFrame()

virtual TTV_ErrorCode ttv::broadcast::PcmAudioReceiver::GetNumPcmSamplesPerFrame ( uint32_t &  result) const
overridevirtual

Retrieves the supported number of PCM audio samples per audio frame. This should be numSamplesPerChannel * numChannels when packaging a frame.

Implements ttv::broadcast::IPcmAudioFrameReceiver.

◆ GetReceiverTypeId()

static ReceiverTypeId ttv::broadcast::IPcmAudioFrameReceiver::GetReceiverTypeId ( )
inlinestaticinherited

◆ PackageFrame()

virtual TTV_ErrorCode ttv::broadcast::PcmAudioReceiver::PackageFrame ( const uint8_t *  sampleBuffer,
uint32_t  numSamplesPerChannel,
uint32_t  numChannels,
bool  interleaved,
AudioSampleFormat  audioSampleFormat,
uint64_t  timeStamp,
std::shared_ptr< AudioFrame > &  result 
)
overridevirtual

Packages the given frame data so it can be enqueued for encoding. When the frame processing of the frame is complete the unlockCallback will be called. The sampleBuffer will be copied so it can safely be used after this call returns. numSamplesPerChannel * numChannels should be the same as the value returned from GetNumPcmSamplesPerFrame().

Implements ttv::broadcast::IPcmAudioFrameReceiver.

Member Data Documentation

◆ mNumPcmSamplesPerFrame

uint32_t ttv::broadcast::PcmAudioReceiver::mNumPcmSamplesPerFrame
private

The documentation for this class was generated from the following file: