Class UpdateSource
Represents an operator that updates the properties of an audio source.
public class UpdateSource : Sink
- Inheritance
-
UpdateSource
- Inherited Members
Properties
DeviceName
Gets or sets the name of the audio device used for playback.
[TypeConverter(typeof(PlaybackDeviceNameConverter))]
public string DeviceName { get; set; }
Property Value
Direction
Gets or sets the current direction vector of the audio source. If this property is not set, the direction of the audio source will not be updated.
[TypeConverter(typeof(NumericRecordConverter))]
public Vector3? Direction { get; set; }
Property Value
Gain
Gets or sets the volume amplification applied to the audio source. If this property is not set, the gain of the audio source will not be updated.
[Precision(2, 0.01)]
[Range(0, 2147483647)]
public float? Gain { get; set; }
Property Value
Pitch
Gets or sets the pitch to be applied to the audio source. If this property is not set, the pitch of the audio source will not be updated.
[Range(0.5, 2)]
[Precision(2, 0.01)]
public float? Pitch { get; set; }
Property Value
Position
Gets or sets the current location of the audio source in three-dimensional space. If this property is not set, the location of the audio source will not be updated.
[TypeConverter(typeof(NumericRecordConverter))]
public Vector3? Position { get; set; }
Property Value
SourceName
Gets or sets the name of the audio source to update.
[TypeConverter(typeof(SourceNameConverter))]
public string SourceName { get; set; }
Property Value
Velocity
Gets or sets the current velocity of the audio source in three-dimensional space. If this property is not set, the velocity of the audio source will not be updated.
[TypeConverter(typeof(NumericRecordConverter))]
public Vector3? Velocity { get; set; }
Property Value
Methods
Process(IObservable<AudioSource>)
Updates the properties of all the audio sources in an observable sequence.
public IObservable<AudioSource> Process(IObservable<AudioSource> source)
Parameters
source
IObservable<AudioSource>A sequence of AudioSource objects whose properties should be updated.
Returns
- IObservable<AudioSource>
An observable sequence that is identical to the
source
sequence but where there is an additional side effect of updating the properties of each of the audio sources in the sequence.
Remarks
If SourceName is not null or empty, this method behaves as Process<TSource>(IObservable<TSource>).
Process<TSource>(IObservable<TSource>)
Updates the properties of the specified audio source whenever the source sequence emits a notification.
public override IObservable<TSource> Process<TSource>(IObservable<TSource> source)
Parameters
source
IObservable<TSource>The sequence containing the notifications used to trigger the update of the audio source.
Returns
- IObservable<TSource>
An observable sequence that is identical to the
source
sequence but where there is an additional side effect of updating the properties of the specified audio source whenever the sequence emits a notification.
Type Parameters
TSource
The type of the elements in the
source
sequence.