Photon Voice: LocalVoiceAudio< T > Class Template Reference
From Photon Voice
|
Photon Voice
v2.7
|
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
Properties |
List of all members
LocalVoiceAudio< T > Class Template Reference
Outgoing audio stream. More...
Inherits LocalVoiceFramed< T >, and ILocalVoiceAudio.
Public Member Functions | |
| override IEncoder | CreateDefaultEncoder (VoiceInfo info) |
| void | VoiceDetectorCalibrate (int durationMs) |
| Trigger voice detector calibration process. More... | |
| void | AddPostProcessor (params IProcessor< T >[] processors) |
| Adds processors after any built-in processors and everything added with AddPreProcessor. More... | |
| void | AddPreProcessor (params IProcessor< T >[] processors) |
| Adds processors before built-in processors and everything added with AddPostProcessor. More... | |
| void | ClearProcessors () |
| Clears all processors in pipeline including built-in resampling. User should add at least resampler processor after call. More... | |
| void | PushDataAsync (T[] buf) |
| Asynchronously push data into this stream. More... | |
| void | PushData (T[] buf) |
| Synchronously push data into this stream. More... | |
| override void | Dispose () |
| Releases resources used by the VoiceFramed instance. Buffers used for asynchronous push will be disposed in encoder thread's 'finally'. More... | |
| void | RemoveSelf () |
| Remove this voice from it's VoiceClient (using VoiceClient.RemoveLocalVoice More... | |
Static Public Member Functions | |
| static LocalVoiceAudio< T > | Create (VoiceClient voiceClient, byte voiceId, IEncoder encoder, VoiceInfo voiceInfo, IAudioDesc audioSourceDesc, int channelId) |
| Create a new LocalVoiceAudio<T> instance. More... | |
Protected Member Functions | |
| void | initBuiltinProcessors () |
| void | resetNoTransmitCnt () |
Protected Attributes | |
| AudioUtil.VoiceDetector< T > | voiceDetector |
| AudioUtil.VoiceDetectorCalibration< T > | voiceDetectorCalibration |
| AudioUtil.LevelMeter< T > | levelMeter |
| int | channels |
| bool | resampleSource |
| IEncoder | encoder |
| VoiceClient | voiceClient |
| volatile bool | disposed |
| object | disposeLock = new object() |
Properties | |
| virtual AudioUtil.IVoiceDetector | VoiceDetector [get] |
| virtual AudioUtil.ILevelMeter | LevelMeter [get] |
| bool | VoiceDetectorCalibrating [get] |
| True if the VoiceDetector is currently calibrating. More... | |
| FactoryPrimitiveArrayPool< T > | BufferFactory [get] |
| bool | PushDataAsyncReady [get] |
| Wether this LocalVoiceFramed has capacity for more data buffers to be pushed asynchronously. More... | |
| int | FrameSize [get] |
| Data flow will be repacked to frames of this size. May differ from input voiceInfo.FrameSize. Processors should resample in this case. More... | |
| byte | Group [get, set] |
| byte | InterestGroup [get, set] |
| If InterestGroup != 0, voice's data is sent only to clients listening to this group (if supported by transport). More... | |
| VoiceInfo | Info [get] |
| Returns Info structure assigned on local voice cration. More... | |
| bool | TransmitEnabled [get, set] |
| If true, stream data broadcasted. More... | |
| bool | IsCurrentlyTransmitting [get, protected set] |
| Returns true if stream broadcasts. More... | |
| int | FramesSent [get] |
| Sent frames counter. More... | |
| int | FramesSentBytes [get] |
| Sent frames bytes counter. More... | |
| bool | Reliable [get, set] |
| Send data reliable. More... | |
| bool | Encrypt [get, set] |
| Send data encrypted. More... | |
| IServiceable | LocalUserServiceable [get, set] |
| Optional user object attached to LocalVoice. its Service() will be called at each VoiceClient.Service() call. More... | |
| bool | DebugEchoMode [get, set] |
| If true, outgoing stream routed back to client via server same way as for remote client's streams. Can be swithed any time. OnRemoteVoiceInfoAction and OnRemoteVoiceRemoveAction are triggered if required. This functionality availability depends on transport. More... | |
| AudioUtil.IVoiceDetector | VoiceDetector [get] |
| The VoiceDetector in use. More... | |
| AudioUtil.ILevelMeter | LevelMeter [get] |
| The LevelMeter utility in use. More... | |
| bool | VoiceDetectorCalibrating [get] |
| If true, voice detector calibration is in progress. More... | |
Additional Inherited Members | |
| const int | DATA_POOL_CAPACITY = 50 |
Detailed Description
Outgoing audio stream.
Member Function Documentation
|
static |
Create a new LocalVoiceAudio<T> instance.
- Parameters
-
voiceClient The VoiceClient to use for this outgoing stream. voiceId Numeric ID for this voice. encoder Encoder to use for this voice. channelId Voice transport channel ID to use for this voice.
- Returns
- The new LocalVoiceAudio<T> instance.
| void VoiceDetectorCalibrate | ( | int | durationMs | ) |
Trigger voice detector calibration process.
While calibrating, keep silence. Voice detector sets threshold basing on measured backgroud noise level.
- Parameters
-
durationMs Duration of calibration in milliseconds.
Implements ILocalVoiceAudio.
Property Documentation
|
get |
True if the VoiceDetector is currently calibrating.