Twitch SDK (Internal)
Public Member Functions | Public Attributes | List of all members
ttv::SampleRange Struct Reference

#include <dsputilities.h>

Public Member Functions

 SampleRange ()
 
 SampleRange (size_t startIndex, size_t sampleCount)
 

Public Attributes

size_t startIndex
 
size_t sampleCount
 

Detailed Description

Concept: AudioSource Provides PCM samples for a range of audio on a global timeline.

class AudioSource { // The type of samples this audio source provides. using SampleType = ...;

// The SampleRate of this audio source, in samples per second. static constexpr size_t SampleRate = ...;

// The range of samples this audio source represents. SampleRange GetSampleRange() const;

// Retrieves the sample at the passed index from the audio source. Passing an index // outside of the audio source's sample range is undefined behavior. SampleType operator[](size_t index); };

Concept: Unary Audio Operator Takes an InputSource and does some transformation on the represented PCM data.

Conforms to AudioSource concept.

template <typename InputSourceType, typename ContextType> class UnaryAudioOperator { UnaryAudioOperator(ContextType& context);

InputSource& GetInputSource(); } A structure that represents a range of audio samples.

Constructor & Destructor Documentation

◆ SampleRange() [1/2]

ttv::SampleRange::SampleRange ( )
inline

◆ SampleRange() [2/2]

ttv::SampleRange::SampleRange ( size_t  startIndex,
size_t  sampleCount 
)
inline

Member Data Documentation

◆ sampleCount

size_t ttv::SampleRange::sampleCount

The length of the range.

◆ startIndex

size_t ttv::SampleRange::startIndex

The start of the range. That is, the number of samples preceding this range in the audio timeline.


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