|
Twitch SDK (Internal)
|
#include <pcmaudiomixer.h>
Public Member Functions | |
| PcmAudioMixer (uint32_t numChannels, uint32_t numSamplesPerChannelPerPacket) | |
| virtual | ~PcmAudioMixer () |
| TTV_ErrorCode | SubmitAudioSamples (const int16_t *data, uint64_t startTime, size_t length, float volume) |
| TTV_ErrorCode | GetNextPacketTime (uint64_t &nextPacketTime) const |
| TTV_ErrorCode | GetPacket (int16_t *buffer, uint64_t &nextPacketTime) |
Private Types | |
| typedef std::vector< int32_t > | buffer_t |
Private Attributes | |
| uint32_t | mNumChannels |
| uint32_t | mNumSamplesPerChannelPerPacket |
| buffer_t | mMixerBuffer |
| uint64_t | mNextPacketTime |
Mixes PCM audio samples. This is a simple class with many assumptions. Do not try and use it with more than 2 audio layers.
|
private |
| ttv::broadcast::PcmAudioMixer::PcmAudioMixer | ( | uint32_t | numChannels, |
| uint32_t | numSamplesPerChannelPerPacket | ||
| ) |
|
virtual |
| TTV_ErrorCode ttv::broadcast::PcmAudioMixer::GetNextPacketTime | ( | uint64_t & | nextPacketTime | ) | const |
| TTV_ErrorCode ttv::broadcast::PcmAudioMixer::GetPacket | ( | int16_t * | buffer, |
| uint64_t & | nextPacketTime | ||
| ) |
Retrieves the mixed audio. The size of the returned packet will be the same as the numSamplesPerChannelPerPacket value the class was created with.
| TTV_ErrorCode ttv::broadcast::PcmAudioMixer::SubmitAudioSamples | ( | const int16_t * | data, |
| uint64_t | startTime, | ||
| size_t | length, | ||
| float | volume | ||
| ) |
|
private |
|
private |
|
private |
|
private |
1.8.13