Photon Voice v2.53

Public Member Functions | Protected Member Functions | List of all members
AudioUtil.ToneAudioPusher< T > Class Template Reference

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

Inherits AudioUtil.GeneratorPusher< T >.

Public Member Functions

 ToneAudioPusher (int frequency=440, int bufSizeMs=100, int samplingRate=48000, int channels=1)
 Create a new ToneAudioReader instance More...
 
- Public Member Functions inherited from AudioUtil.GeneratorPusher< T >
 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

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

Additional Inherited Members

- Protected Attributes inherited from AudioUtil.GeneratorPusher< T >
long timeSamples
 
- Properties inherited from AudioUtil.GeneratorPusher< T >
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.

Constructor & Destructor Documentation

◆ ToneAudioPusher()

ToneAudioPusher ( int  frequency = 440,
int  bufSizeMs = 100,
int  samplingRate = 48000,
int  channels = 1 
)

Create a new ToneAudioReader instance

Parameters
frequencyFrequency of the generated tone (in Hz).
bufSizeMsSize of buffers to push (in milliseconds).
samplingRateSampling rate of the audio signal (in Hz).
channelsNumber of channels in the audio signal.