Class AudioSource
Represents a source of spatialized audio which can be used to define and control the audio landscape surrounding the listener.
public class AudioSource : IDisposable
- Inheritance
-
AudioSource
- Implements
- Inherited Members
Constructors
- AudioSource()
Initializes a new instance of the AudioSource class.
Properties
- Direction
Gets or sets the direction vector of the audio source.
- Gain
Gets or sets the volume amplification applied to the audio source.
- Id
Gets the name of the audio source. This is an OpenAL buffer reference which can be used to call audio source manipulation functions.
- Looping
Gets or sets a value indicating whether the audio source is looping.
- Pitch
Gets or sets the pitch to be applied to the audio source.
- Position
Gets or sets the location of the audio source in three-dimensional space.
- Relative
Gets or sets a value indicating whether the audio source uses coordinates relative to the listener.
- State
Gets information about the current source state.
- Velocity
Gets or sets the velocity of the audio source in three-dimensional space.
Methods
- Dispose()
Releases all resources used by the AudioSource class.
- Pause()
Pauses the source and sets its state to OpenTK.Audio.OpenAL.ALSourceState.Paused.
- Play()
Plays, replays, or resumes the source and sets its state to OpenTK.Audio.OpenAL.ALSourceState.Playing. If the source is already playing, the source will restart at the beginning.
- Rewind()
Stops the source and sets its state to OpenTK.Audio.OpenAL.ALSourceState.Initial.
- Stop()
Stops the source and sets its state to OpenTK.Audio.OpenAL.ALSourceState.Stopped.