Photon Voice v2.53

Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
AudioUtil.GeneratorPusher< T > Class Template Referenceabstract

IAudioPusher that provides a constant tone signal. More...

Inherits IAudioPusher< T >.

Inherited by AudioUtil.ToneAudioPusher< T >, and AudioUtil.WaveformAudioPusher< T >.

Public Member Functions

 GeneratorPusher (int bufSizeMs=100, int samplingRate=48000, int channels=1)
 
void SetCallback (Action< T[]> callback, ObjectFactory< T[], int > bufferFactory)
 Set the callback function used for pushing data More...
 
void Dispose ()
 

Protected Member Functions

abstract int Gen (T[] buf, long timeSamples)
 

Protected Attributes

long timeSamples
 

Properties

int Channels [get]
 
int SamplingRate [get]
 
string Error [get]
 
- Properties inherited from IAudioDesc
int SamplingRate [get]
 Sampling rate of the audio signal (in Hz). More...
 
int Channels [get]
 Number of channels in the audio signal. More...
 
string Error [get]
 If not null, audio object is in invalid state. More...
 

Detailed Description

IAudioPusher that provides a constant tone signal.

Member Function Documentation

◆ SetCallback()

void SetCallback ( Action< T[]>  callback,
ObjectFactory< T[], int >  bufferFactory 
)

Set the callback function used for pushing data

Parameters
callbackCallback function to use
bufferFactoryBuffer factory used to create the buffer that is pushed to the callback

Implements IAudioPusher< T >.