Photon Voice
v2.58
IAudioReader that provides a constant tone signal. More...
Inherits AudioUtil.GeneratorReader< T >.
Public Member Functions | |
| ToneAudioReader (Func< double > clockSec=null, double frequency=440, int samplingRate=48000, int channels=1) | |
| Create a new ToneAudioReader instance More... | |
Public Member Functions inherited from AudioUtil.GeneratorReader< T > | |
| GeneratorReader (Func< double > clockSec=null, int samplingRate=48000, int channels=1) | |
| void | Dispose () |
| bool | Read (T[] buf) |
| Fill full given frame buffer with source uncompressed data or return false if not enough such data. More... | |
Protected Member Functions | |
| override int | Gen (T[] buf, long timeSamples) |
Additional Inherited Members | |
Properties inherited from AudioUtil.GeneratorReader< 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... | |
IAudioReader that provides a constant tone signal.
Because of current resampling algorithm, the tone is distorted if SamplingRate does not equal encoder sampling rate.
| ToneAudioReader | ( | Func< double > | clockSec = null, |
| double | frequency = 440, |
||
| int | samplingRate = 48000, |
||
| int | channels = 1 |
||
| ) |
Create a new ToneAudioReader instance
| clockSec | Function to get current time in seconds. In Unity, pass in '() => AudioSettings.dspTime' for better results. |
| frequency | Frequency of the generated tone (in Hz). |
| samplingRate | Sampling rate of the audio signal (in Hz). |
| channels | Number of channels in the audio signal. |