Photon Voice
v2.7
|
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
-
frequency Frequency of the generated tone (in Hz). bufSizeMs Size of buffers to push (in milliseconds). samplingRate Sampling rate of the audio signal (in Hz). channels Number 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
-
callback Callback function to use localVoice Outgoing audio stream, for context
Implements IAudioPusher< T >.