Twitch SDK (Internal)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ttv::broadcast::IPcmAudioFrameReceiver Class Referenceabstract

#include <ipcmaudioframereceiver.h>

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

Public Types

typedef size_t ReceiverTypeId
 

Public Member Functions

virtual TTV_ErrorCode GetNumPcmSamplesPerFrame (uint32_t &result) const =0
 
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)=0
 

Static Public Member Functions

static ReceiverTypeId GetReceiverTypeId ()
 

Detailed Description

Receives PCM audio data.

Member Typedef Documentation

◆ ReceiverTypeId

Member Function Documentation

◆ GetNumPcmSamplesPerFrame()

virtual TTV_ErrorCode ttv::broadcast::IPcmAudioFrameReceiver::GetNumPcmSamplesPerFrame ( uint32_t &  result) const
pure virtual

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

Implemented in ttv::broadcast::PcmAudioReceiver.

◆ GetReceiverTypeId()

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

◆ PackageFrame()

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

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().

Implemented in ttv::broadcast::PcmAudioReceiver.


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