Class AudioRecordSource
An Android AudioRecord-based source.
Inheritance
System.Object
AudioRecordSource
Assembly: FM.LiveSwitch.Android.dll
Syntax
public class AudioRecordSource : AudioSource, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
AudioRecordSource(Context, AudioConfig)
Declaration
public AudioRecordSource(Context context, AudioConfig config)
Parameters
Type |
Name |
Description |
Context |
context |
The Android context.
|
AudioConfig |
config |
The configuration.
|
Properties
AudioSource
Gets or sets the desired audio source (MediaRecorder.AudioSource).
Defaults to MediaRecorder.AudioSource.MIC due to compatibility
issues on some devices.
Declaration
public Android.Media.AudioSource AudioSource { get; set; }
Property Value
Type |
Description |
Android.Media.AudioSource |
|
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.Label
UseAcousticEchoCanceler
Gets or sets whether or not the Android AcousticEchoCanceler should be used.
Defaults to false.
Declaration
public bool UseAcousticEchoCanceler { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
UseAutomaticGainControl
Gets or sets whether or not the Android AutomaticGainControl should be used.
Defaults to true.
Declaration
public bool UseAutomaticGainControl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
UseNoiseSuppressor
Gets or sets whether or not the Android NoiseSuppressor should be used.
Defaults to true.
Declaration
public bool UseNoiseSuppressor { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
AddDeviceToVoiceCommunicationBlackList(String)
Add device to voiceCommunicationBlackList.
Declaration
public static void AddDeviceToVoiceCommunicationBlackList(string deviceModel)
Parameters
Type |
Name |
Description |
System.String |
deviceModel |
|
DoDestroy()
Declaration
protected override void DoDestroy()
Overrides
DoStart()
Declaration
protected override Future<Object> DoStart()
Returns
Type |
Description |
Future<Object> |
|
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoStart()
DoStop()
Declaration
protected override Future<Object> DoStop()
Returns
Type |
Description |
Future<Object> |
|
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoStop()
getBufferDelay(AudioConfig)
Gets the length of the audio buffer in milliseconds.
Declaration
public static int getBufferDelay(AudioConfig config)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Declaration
public override Future<SourceInput[]> GetInputs()
Returns
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.GetInputs()
GetVoiceCommunicationBlackList()
Get voiceCommunicationBlackList.
Declaration
public static string[] GetVoiceCommunicationBlackList()
Returns
Type |
Description |
System.String[] |
|
IsBluetoothHeadsetConnected()
Declaration
public Boolean IsBluetoothHeadsetConnected()
Returns
RemoveDeviceFromVoiceCommunicationBlackList(String)
Remove device from voiceCommunicationBlackList.
Declaration
public static void RemoveDeviceFromVoiceCommunicationBlackList(string deviceModel)
Parameters
Type |
Name |
Description |
System.String |
deviceModel |
|
RouteToBluetoothHeadset()
Declaration
public void RouteToBluetoothHeadset()
Implements