Class AudioSource
Inheritance
System.Object
Foundation.NSObject
AudioSource
Implements
System.IEquatable<Foundation.NSObject>
Foundation.INSObjectProtocol
ObjCRuntime.INativeObject
System.IDisposable
Inherited Members
Foundation.NSObject.MonoMacAssembly
Foundation.NSObject.PlatformAssembly
Foundation.NSObject.Dispose()
Foundation.NSObject.IsNewRefcountEnabled()
Foundation.NSObject.MarkDirty()
Foundation.NSObject.ConformsToProtocol(System.IntPtr)
Foundation.NSObject.DangerousRelease()
Foundation.NSObject.DangerousRetain()
Foundation.NSObject.DangerousAutorelease()
Foundation.NSObject.GetNativeField(System.String)
Foundation.NSObject.SetNativeField(System.String, Foundation.NSObject)
Foundation.NSObject.BeginInvokeOnMainThread(ObjCRuntime.Selector, Foundation.NSObject)
Foundation.NSObject.InvokeOnMainThread(ObjCRuntime.Selector, Foundation.NSObject)
Foundation.NSObject.BeginInvokeOnMainThread(System.Action)
Foundation.NSObject.InvokeOnMainThread(System.Action)
Foundation.NSObject.FromObject(System.Object)
Foundation.NSObject.SetValueForKeyPath(System.IntPtr, Foundation.NSString)
Foundation.NSObject.GetHashCode()
Foundation.NSObject.Equals(System.Object)
Foundation.NSObject.Equals(Foundation.NSObject)
Foundation.NSObject.ToString()
Foundation.NSObject.Invoke(System.Action, System.Double)
Foundation.NSObject.Invoke(System.Action, System.TimeSpan)
Foundation.NSObject.Dispose(System.Boolean)
Foundation.NSObject.AddObserver(System.String, Foundation.NSKeyValueObservingOptions, System.Action<Foundation.NSObservedChange>)
Foundation.NSObject.AddObserver(Foundation.NSString, Foundation.NSKeyValueObservingOptions, System.Action<Foundation.NSObservedChange>)
Foundation.NSObject.AddObserver(Foundation.NSObject, Foundation.NSString, Foundation.NSKeyValueObservingOptions, System.IntPtr)
Foundation.NSObject.AddObserver(Foundation.NSObject, System.String, Foundation.NSKeyValueObservingOptions, System.IntPtr)
Foundation.NSObject.AutomaticallyNotifiesObserversForKey(System.String)
Foundation.NSObject.AwakeFromNib()
Foundation.NSObject.Bind(Foundation.NSString, Foundation.NSObject, System.String, Foundation.NSDictionary)
Foundation.NSObject.CancelPreviousPerformRequest(Foundation.NSObject)
Foundation.NSObject.CancelPreviousPerformRequest(Foundation.NSObject, ObjCRuntime.Selector, Foundation.NSObject)
Foundation.NSObject.CommitEditing()
Foundation.NSObject.CommitEditing(Foundation.NSObject, ObjCRuntime.Selector, System.IntPtr)
Foundation.NSObject.Copy()
Foundation.NSObject.DidChange(Foundation.NSKeyValueChange, Foundation.NSIndexSet, Foundation.NSString)
Foundation.NSObject.DidChange(Foundation.NSString, Foundation.NSKeyValueSetMutationKind, Foundation.NSSet)
Foundation.NSObject.DidChangeValue(System.String)
Foundation.NSObject.DoesNotRecognizeSelector(ObjCRuntime.Selector)
Foundation.NSObject.ExposedBindings()
Foundation.NSObject.GetBindingInfo(Foundation.NSString)
Foundation.NSObject.GetBindingOptionDescriptions(Foundation.NSString)
Foundation.NSObject.GetBindingValueClass(Foundation.NSString)
Foundation.NSObject.GetDefaultPlaceholder(Foundation.NSObject, System.String)
Foundation.NSObject.GetDefaultPlaceholder(Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.GetDictionaryOfValuesFromKeys(Foundation.NSString[])
Foundation.NSObject.GetKeyPathsForValuesAffecting(Foundation.NSString)
Foundation.NSObject.GetMethodForSelector(ObjCRuntime.Selector)
Foundation.NSObject.GetNativeHash()
Foundation.NSObject.IsEqual(Foundation.NSObject)
Foundation.NSObject.IsKindOfClass(ObjCRuntime.Class)
Foundation.NSObject.IsMemberOfClass(ObjCRuntime.Class)
Foundation.NSObject.MutableCopy()
Foundation.NSObject.ObjectDidEndEditing(Foundation.NSObject)
Foundation.NSObject.ObserveValue(Foundation.NSString, Foundation.NSObject, Foundation.NSDictionary, System.IntPtr)
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSObject, System.Double, Foundation.NSString[])
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSObject, System.Double)
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSThread, Foundation.NSObject, System.Boolean)
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSThread, Foundation.NSObject, System.Boolean, Foundation.NSString[])
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector)
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSObject)
Foundation.NSObject.PerformSelector(ObjCRuntime.Selector, Foundation.NSObject, Foundation.NSObject)
Foundation.NSObject.PrepareForInterfaceBuilder()
Foundation.NSObject.RemoveObserver(Foundation.NSObject, Foundation.NSString, System.IntPtr)
Foundation.NSObject.RemoveObserver(Foundation.NSObject, System.String, System.IntPtr)
Foundation.NSObject.RemoveObserver(Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.RemoveObserver(Foundation.NSObject, System.String)
Foundation.NSObject.RespondsToSelector(ObjCRuntime.Selector)
Foundation.NSObject.SetDefaultPlaceholder(Foundation.NSObject, Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.SetNilValueForKey(Foundation.NSString)
Foundation.NSObject.SetValueForKey(Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.SetValueForKeyPath(Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.SetValueForUndefinedKey(Foundation.NSObject, Foundation.NSString)
Foundation.NSObject.SetValuesForKeysWithDictionary(Foundation.NSDictionary)
Foundation.NSObject.Unbind(Foundation.NSString)
Foundation.NSObject.ValueForKey(Foundation.NSString)
Foundation.NSObject.ValueForKeyPath(Foundation.NSString)
Foundation.NSObject.ValueForUndefinedKey(Foundation.NSString)
Foundation.NSObject.WillChange(Foundation.NSKeyValueChange, Foundation.NSIndexSet, Foundation.NSString)
Foundation.NSObject.WillChange(Foundation.NSString, Foundation.NSKeyValueSetMutationKind, Foundation.NSSet)
Foundation.NSObject.WillChangeValue(System.String)
Foundation.NSObject.IsDirectBinding
Foundation.NSObject.SuperHandle
Foundation.NSObject.Handle
Foundation.NSObject.ClassHandle
Foundation.NSObject.Class
Foundation.NSObject.DebugDescription
Foundation.NSObject.Description
Foundation.NSObject.IsProxy
Foundation.NSObject.RetainCount
Foundation.NSObject.Self
Foundation.NSObject.Superclass
Foundation.NSObject.Zone
Foundation.NSObject.ChangeIndexesKey
Foundation.NSObject.ChangeKindKey
Foundation.NSObject.ChangeNewKey
Foundation.NSObject.ChangeNotificationIsPriorKey
Foundation.NSObject.ChangeOldKey
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class AudioSource : MediaSource<IAudioOutput, IAudioInput, IAudioInputCollection, AudioSource, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IEquatable<NSObject>, INSObjectProtocol, INativeObject, IDisposable, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
Declaration
public AudioSource(AudioFormat outputFormat)
Parameters
Type |
Name |
Description |
AudioFormat |
outputFormat |
The output format.
|
Declaration
public AudioSource(AudioFormat outputFormat, int frameDuration)
Parameters
Type |
Name |
Description |
AudioFormat |
outputFormat |
The output format.
|
System.Int32 |
frameDuration |
The frame duration in milliseconds.
|
Properties
Config
Gets the output configuration.
Declaration
public AudioConfig Config { get; }
Property Value
DisableTimestampReset
Gets or sets whether the timestamp should be reset
using the wall clock after TimestampResetInterval
milliseconds elapse between frames.
Declaration
public bool DisableTimestampReset { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ForceTimestampReset
Gets or sets whether the timestamp should be reset
before the next frame is processed.
Declaration
public bool ForceTimestampReset { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
FrameDuration
Gets the frame duration in milliseconds.
Defaults to 20.
Declaration
public int FrameDuration { get; }
Property Value
Type |
Description |
System.Int32 |
|
TimestampResetInterval
Gets or sets the amount of time in milliseconds
between audio frames that will trigger a reset of
the timestamp to the wall clock.
Declaration
public int TimestampResetInterval { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Volume
Gets or sets a value indicating the volume
(output resistance) of this source.
Valid value range is 0.0 to 1.0, inclusive.
Declaration
public double Volume { get; set; }
Property Value
Type |
Description |
System.Double |
|
Methods
CalculateDuration(Int32)
Calculates the duration of an audio chunk given its data
length (the number of bytes) and assuming that the clock
rate and channel count match the output format.
Declaration
public int CalculateDuration(int dataLength)
Parameters
Type |
Name |
Description |
System.Int32 |
dataLength |
The length of the audio chunk.
|
Returns
Type |
Description |
System.Int32 |
|
CalculateDuration(Int32, AudioConfig)
Calculates the duration of an audio chunk given its data
length (the number of bytes), clock rate, and channel count.
Declaration
[Obsolete("Use SoundUtility.CalculateDuration instead.")]
public static int CalculateDuration(int dataLength, AudioConfig config)
Parameters
Type |
Name |
Description |
System.Int32 |
dataLength |
The length of the audio chunk.
|
AudioConfig |
config |
The configuration.
|
Returns
Type |
Description |
System.Int32 |
|
CalculateDuration(Int32, Int32, Int32)
Calculates the duration of an audio chunk given its data
length (the number of bytes), clock rate, and channel count.
Declaration
[Obsolete("Use SoundUtility.CalculateDuration instead.")]
public static int CalculateDuration(int dataLength, int clockRate, int channelCount)
Parameters
Type |
Name |
Description |
System.Int32 |
dataLength |
The length of the audio chunk.
|
System.Int32 |
clockRate |
The clock rate.
|
System.Int32 |
channelCount |
The channel count.
|
Returns
Type |
Description |
System.Int32 |
|
CalculateDurationFloat(Int32)
Calculates the duration of an audio chunk given its data
length (the number of bytes) and assuming that the clock
rate and channel count match the output format.
Declaration
public int CalculateDurationFloat(int dataLength)
Parameters
Type |
Name |
Description |
System.Int32 |
dataLength |
The length of the audio chunk.
|
Returns
Type |
Description |
System.Int32 |
|
CalculateDurationFloat(Int32, Int32, Int32)
Calculates the duration of an audio chunk given its data
length (the number of bytes), clock rate, and channel count.
Declaration
[Obsolete("Use SoundUtility.CalculateDurationFloat instead.")]
public static int CalculateDurationFloat(int dataLength, int clockRate, int channelCount)
Parameters
Type |
Name |
Description |
System.Int32 |
dataLength |
The length of the audio chunk.
|
System.Int32 |
clockRate |
The clock rate.
|
System.Int32 |
channelCount |
The channel count.
|
Returns
Type |
Description |
System.Int32 |
|
Creates an input collection.
Declaration
protected override IAudioInputCollection CreateInputCollection(IAudioOutput output)
Parameters
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>.CreateInputCollection(FM.LiveSwitch.IAudioOutput)
DoDestroy()
Declaration
protected override void DoDestroy()
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>.DoDestroy()
RaiseFrame(AudioFrame)
Declaration
protected override void RaiseFrame(AudioFrame frame)
Parameters
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>.RaiseFrame(FM.LiveSwitch.AudioFrame)
TrySetSystemTimestamp(AudioFrame)
Tries to set the system timestamp on an audio frame.
This will succeed if the system timestamp is already
set or if the system timestamp can be calculated off
the timestamp.
Declaration
protected bool TrySetSystemTimestamp(AudioFrame frame)
Parameters
Returns
Type |
Description |
System.Boolean |
|
TrySetTimestamp(AudioFrame)
Tries to set the timestamp on an audio frame.
This will succeed if the timestamp is already
set or if the timestamp can be calculated off
the system timestamp.
Declaration
protected bool TrySetTimestamp(AudioFrame frame)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>
Foundation.INSObjectProtocol
ObjCRuntime.INativeObject
System.IDisposable