Table of Contents

Class CreateSource

Namespace
Bonsai.Audio
Assembly
Bonsai.Audio.dll

Represents an operator that creates a spatialized source on the specified audio device.

public class CreateSource : Source<AudioSource>
Inheritance
CreateSource
Inherited Members

Properties

BufferName

Gets or sets the optional name of a buffer to play when creating the source.

[TypeConverter(typeof(BufferNameConverter))]
public string BufferName { get; set; }

Property Value

string

DeviceName

Gets or sets the name of the audio device used for playback.

[TypeConverter(typeof(PlaybackDeviceNameConverter))]
public string DeviceName { get; set; }

Property Value

string

Direction

Gets or sets the direction vector of the audio source.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Direction { get; set; }

Property Value

Vector3

Gain

Gets or sets the volume amplification applied to the audio source.

[Precision(2, 0.01)]
[Range(0, 2147483647)]
public float Gain { get; set; }

Property Value

float

Looping

Gets or sets a value indicating whether the audio source is looping.

public bool Looping { get; set; }

Property Value

bool

Pitch

Gets or sets the pitch to be applied to the audio source.

[Range(0.5, 2)]
[Precision(2, 0.01)]
public float Pitch { get; set; }

Property Value

float

Position

Gets or sets the current location of the audio source in three-dimensional space.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Position { get; set; }

Property Value

Vector3

Relative

Gets or sets a value indicating whether the audio source uses coordinates relative to the listener.

public bool Relative { get; set; }

Property Value

bool

State

Gets or sets a value specifying the state to which the source should be set after creation.

public ALSourceState State { get; set; }

Property Value

ALSourceState

Velocity

Gets or sets the current velocity of the audio source in three-dimensional space.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Velocity { get; set; }

Property Value

Vector3

Methods

Generate()

Generates an observable sequence that contains the created audio source.

public override IObservable<AudioSource> Generate()

Returns

IObservable<AudioSource>

A sequence containing the created AudioSource instance.