Twitch SDK (Internal)
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex > Class Template Reference

#include <pcmbufferaudiosource.h>

Public Types

using SampleType = typename BufferFormat::SampleType
 

Public Member Functions

 PCMBufferAudioSource (ContextType &context)
 
void Bind (const SampleType *buffer, SampleRange range)
 
void Unbind ()
 
SampleRange GetSampleRange () const
 
SampleType operator[] (size_t index) const
 

Static Public Attributes

static constexpr size_t SampleRate = BufferFormat::SampleRate
 
static constexpr size_t ChannelCount = BufferFormat::ChannelCount
 

Private Attributes

const SampleTypemBuffer
 
SampleRange mRange
 

Detailed Description

template<typename BufferFormat, typename ContextType, size_t SelectedChannelIndex = 0>
class ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >

An AudioSource representing a channel of PCM audio backed by a buffer of (possibly interleaved) samples.

Template Parameters
BufferFormatA bundle of parameters that describes the format of the audio data. See BufferFormat in dsputilities.h
SelectedChannelIndexThe index of the channel containing the data. In PCM audio, the channels are typically interleaved, so this is to ensure that we only index into the samples for that particular channel.

Member Typedef Documentation

◆ SampleType

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
using ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::SampleType = typename BufferFormat::SampleType

Constructor & Destructor Documentation

◆ PCMBufferAudioSource()

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::PCMBufferAudioSource ( ContextType &  context)
inline

Member Function Documentation

◆ Bind()

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
void ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::Bind ( const SampleType buffer,
SampleRange  range 
)
inline

◆ GetSampleRange()

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
SampleRange ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::GetSampleRange ( ) const
inline

◆ operator[]()

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
SampleType ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::operator[] ( size_t  index) const
inline

◆ Unbind()

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
void ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::Unbind ( )
inline

Member Data Documentation

◆ ChannelCount

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
constexpr size_t ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::ChannelCount = BufferFormat::ChannelCount
static

◆ mBuffer

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
const SampleType* ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::mBuffer
private

◆ mRange

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
SampleRange ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::mRange
private

◆ SampleRate

template<typename BufferFormat , typename ContextType , size_t SelectedChannelIndex = 0>
constexpr size_t ttv::PCMBufferAudioSource< BufferFormat, ContextType, SelectedChannelIndex >::SampleRate = BufferFormat::SampleRate
static

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