Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | Properties | List of all members
AudioUtil.ToneAudioPusher< T > Class Template Reference

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

Inherits IAudioPusher< T >.

Public Member Functions

 ToneAudioPusher (int frequency=440, int bufSizeMs=100, int samplingRate=441000, int channels=2)
 Create a new ToneAudioReader instance More...
 
void SetCallback (Action< T[]> callback, ObjectFactory< T[], int > bufferFactory)
 Set the callback function used for pushing data More...
 
void Dispose ()
 

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.

Constructor & Destructor Documentation

ToneAudioPusher ( int  frequency = 440,
int  bufSizeMs = 100,
int  samplingRate = 441000,
int  channels = 2 
)

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.

Member Function Documentation

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

Set the callback function used for pushing data

Parameters
callbackCallback function to use
localVoiceOutgoing audio stream, for context

Implements IAudioPusher< T >.