Twitch SDK (Internal)
Classes | Namespaces | Typedefs
operatorchainbuilder.h File Reference
#include "twitchsdk/broadcast/internal/audioconvert/audioconvertoptions.h"
#include "twitchsdk/broadcast/internal/audioconvert/converttofloatingpointoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/converttointegraltypeoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/converttosignedoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/converttounsignedoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/changefloatingpointdepthoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/decreasebitdepthoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/dsputilities.h"
#include "twitchsdk/broadcast/internal/audioconvert/increasebitdepthoperator.h"
#include "twitchsdk/broadcast/internal/audioconvert/operatorchainbuilder.h"
#include "twitchsdk/broadcast/internal/audioconvert/pcmbufferaudiosource.h"
#include "twitchsdk/broadcast/internal/audioconvert/resampleoperator.h"

Go to the source code of this file.

Classes

struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::MakeSignedIfIntegralSelector< ScalarType, Enable >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::MakeSignedIfIntegralSelector< ScalarType, std::enable_if_t< std::is_integral< ScalarType >::value > >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::InputSourceWrapper
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ConvertToSignedWrapper< InputSource >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ConvertToUnsignedWrapper< InputSource >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ChangeFloatingPointDepthWrapper< InputSource, OutputSampleType >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ConvertToIntegralTypeWrapper< InputSource, OutputSampleType >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ConvertToFloatingTypeWrapper< InputSource, OutputSampleType >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::IncreaseBitDepthWrapper< InputSource, OutputSampleType >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::DecreaseBitDepthWrapper< InputSource, OutputSampleType >
 
struct  ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::ResampleWrapper< InputSource, SampleRateArg >
 
struct  ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, RemainingChannelCount, CurrentChannels >
 
struct  ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, 0, CurrentChannels... >
 

Namespaces

 ttv
 JSON (JavaScript Object Notation).
 

Typedefs

template<typename ContextType , typename InputBufferFormat , typename OutputBufferFormat , size_t SelectedChannelIndex>
using ttv::BuildOperatorChain = typename OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::Type
 
template<typename ContextType , typename InputBufferFormat , typename OutputBufferFormat >
using ttv::BuildOperatorChainTuple = typename OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, InputBufferFormat::ChannelCount >::Type
 

Class Documentation

◆ ttv::OperatorChainBuilder

struct ttv::OperatorChainBuilder

template<typename ContextType, typename InputBufferFormat, typename OutputBufferFormat, size_t SelectedChannelIndex>
struct ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >

This class builds a chain of operators to convert audio from a given input buffer format to an output buffer format.

Template Parameters
ContextTypeThe type of AudioConvertContext for the operators to use. See audioconvertcontext.h
InputBufferFormatThe input buffer format. See BufferFormat in dsputilities.h
OutputBufferFormatThe output buffer format. See BufferFormat in dsputilities.h
SelectedChannelIndexWhich input audio channel this chain will process.
Class Members
typedef conditional_t
< is_floating_point
< OutputSampleType >::value,
ChangeFloatingPointDepthWrapper
< Input, OutputSampleType >
, MatchSignedness
< ConvertToIntegralTypeWrapper
< Input, MakeSignedIfIntegral
< OutputSampleType >
>, OutputSampleType > >
ConvertFloatingToSampleType
typedef conditional_t
< SampleRate==SampleRate,
MatchSampleType< Input,
typename SampleType >
, ConvertSampleRateAndType
< Input, Output > >
ConvertFormat
typedef conditional_t< sizeof(typename
SampleType)< sizeof(OutputSampleType),
IncreaseBitDepthWrapper< Input,
OutputSampleType >
, DecreaseBitDepthWrapper
< Input, OutputSampleType > >
ConvertIntegralDepth
typedef conditional_t
< is_floating_point
< OutputSampleType >::value,
ConvertToFloatingTypeWrapper
< MatchSignedness< Input,
OutputSampleType >
, OutputSampleType >
, MatchIntegralDepth
< MatchSignedness< Input,
OutputSampleType >
, OutputSampleType > >
ConvertIntegralToSampleType
typedef conditional_t<(sizeof(typename
SampleType)< sizeof(typename
SampleType)), MatchSignedness
< ResampleWrapper
< MatchSampleType< Input,
MakeSignedIfIntegral< typename
SampleType > >, SampleRate >
, typename SampleType >
, MatchSampleType
< ResampleWrapper< MakeSigned
< Input >, SampleRate >
, typename SampleType > >
ConvertSampleRateAndType
typedef conditional_t
< is_floating_point< typename
SampleType >::value,
ConvertFloatingToSampleType
< Input, OutputSampleType >
, ConvertIntegralToSampleType
< Input, OutputSampleType > >
ConvertSampleType
typedef conditional_t
< is_signed< typename
SampleType >::value,
ConvertToUnsignedWrapper
< Input >
, ConvertToSignedWrapper
< Input > >
FlipSignedness
typedef conditional_t
< is_unsigned< typename
SampleType >::value,
ConvertToSignedWrapper< Input >
, Input >
MakeSigned
typedef typename
MakeSignedIfIntegralSelector
< ScalarType >::Type
MakeSignedIfIntegral
typedef conditional_t< sizeof(typename
SampleType)==sizeof(OutputSampleType),
Input, ConvertIntegralDepth
< Input, OutputSampleType > >
MatchIntegralDepth
typedef conditional_t< is_same
< typename SampleType,
OutputSampleType >::value,
Input, ConvertSampleType
< Input, OutputSampleType > >
MatchSampleType
typedef conditional_t
< is_signed< typename
SampleType >::value==is_signed
< OutputSampleType >::value,
Input, FlipSignedness< Input > >
MatchSignedness
typedef typename template Unwrap<> Type
typedef ConvertFormat
< InputSourceWrapper,
OutputBufferFormat >
WrappedType

◆ ttv::OperatorChainBuilder::MakeSignedIfIntegralSelector

struct ttv::OperatorChainBuilder::MakeSignedIfIntegralSelector

template<typename ContextType, typename InputBufferFormat, typename OutputBufferFormat, size_t SelectedChannelIndex>
template<typename ScalarType, typename Enable = void>
struct ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::MakeSignedIfIntegralSelector< ScalarType, Enable >

std::make_signed chokes if we pass it a non-integral type. We sometimes want to pass floating-point types in the algorithm below, so this is a more lenient version that is just a no-op for floating-point types.

Class Members
typedef ScalarType Type

◆ ttv::OperatorChainBuilder::MakeSignedIfIntegralSelector< ScalarType, std::enable_if_t< std::is_integral< ScalarType >::value > >

struct ttv::OperatorChainBuilder::MakeSignedIfIntegralSelector< ScalarType, std::enable_if_t< std::is_integral< ScalarType >::value > >

template<typename ContextType, typename InputBufferFormat, typename OutputBufferFormat, size_t SelectedChannelIndex>
template<typename ScalarType>
struct ttv::OperatorChainBuilder< ContextType, InputBufferFormat, OutputBufferFormat, SelectedChannelIndex >::MakeSignedIfIntegralSelector< ScalarType, std::enable_if_t< std::is_integral< ScalarType >::value > >

Class Members
typedef make_signed_t< ScalarType > Type

◆ ttv::OperatorChainTupleBuilder

struct ttv::OperatorChainTupleBuilder

template<typename ContextType, typename InputBufferFormat, typename OutputBufferFormat, size_t RemainingChannelCount, typename ... CurrentChannels>
struct ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, RemainingChannelCount, CurrentChannels >

Class Members
typedef BuildOperatorChain
< ContextType,
InputBufferFormat,
OutputBufferFormat,
RemainingChannelCount - 1 >
AppendedOperatorChain
Type

◆ ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, 0, CurrentChannels... >

struct ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, 0, CurrentChannels... >

template<typename ContextType, typename InputBufferFormat, typename OutputBufferFormat, typename ... CurrentChannels>
struct ttv::OperatorChainTupleBuilder< ContextType, InputBufferFormat, OutputBufferFormat, 0, CurrentChannels... >

Class Members
Type