C# Class GAudio.MicrophoneModule

Inheritance: SourceToStreamModule
ファイルを表示 Open project: gregzo/G-Audio

Public Properties

Property Type Description
initInStart bool
onMicFailed OnMicFailed

Protected Properties

Property Type Description
_initialized bool
_onReadyToRecord ReadyToRecordHandler

Public Methods

Method Description
InitDevices ( ) : void
OnDestroy ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
ResetDevices ( ) : void

Call to refresh the list of available microphones ( Microphones static property ). This stops the current microphone.

StartMicrophone ( GATMicInfo micInfo, ReadyToRecordHandler callback = null ) : void

Prepares and starts a stream with mic input. This method starts a coroutine: when mic input goes live, callback will be fired.

StartMicrophone ( ReadyToRecordHandler callback = null ) : void

Prepares and starts a stream with CurrentMic as input. This method starts a coroutine: when mic input goes live, callback will be fired.

Update ( ) : void

Protected Methods

Method Description
Awake ( ) : void
OnAudioFilterRead ( float data, int numChannels ) : void

Private Methods

Method Description
InitMicrophonedRoutine ( ) : IEnumerator
Start ( ) : IEnumerator

Method Details

Awake() protected method

protected Awake ( ) : void
return void

InitDevices() public method

public InitDevices ( ) : void
return void

OnAudioFilterRead() protected method

protected OnAudioFilterRead ( float data, int numChannels ) : void
data float
numChannels int
return void

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

ResetDevices() public method

Call to refresh the list of available microphones ( Microphones static property ). This stops the current microphone.
public ResetDevices ( ) : void
return void

StartMicrophone() public method

Prepares and starts a stream with mic input. This method starts a coroutine: when mic input goes live, callback will be fired.
public StartMicrophone ( GATMicInfo micInfo, ReadyToRecordHandler callback = null ) : void
micInfo GATMicInfo
callback ReadyToRecordHandler
return void

StartMicrophone() public method

Prepares and starts a stream with CurrentMic as input. This method starts a coroutine: when mic input goes live, callback will be fired.
public StartMicrophone ( ReadyToRecordHandler callback = null ) : void
callback ReadyToRecordHandler
return void

Update() public method

public Update ( ) : void
return void

Property Details

_initialized protected_oe property

protected bool _initialized
return bool

_onReadyToRecord protected_oe property

protected ReadyToRecordHandler _onReadyToRecord
return ReadyToRecordHandler

initInStart public_oe property

Should the default microphone be primed in Start()?
public bool initInStart
return bool

onMicFailed public_oe property

Subscribe to this delegate to be notified of interruptions, for example when the user plugs or unplugs headphones. You can immediately call StartMicrophone() to resume recording.
public OnMicFailed onMicFailed
return OnMicFailed