Class AudioDevice
Represents a audio output device.
Implements
Inherited Members
Namespace: Evergine.Common.Audio
Assembly: Evergine.Common.dll
Syntax
public abstract class AudioDevice : IDisposable
Constructors
AudioDevice()
Initializes a new instance of the AudioDevice class.
Declaration
public AudioDevice()
Properties
DefaultListener
Gets the default listener used by Apply3D(AudioEmitter).
Declaration
public abstract AudioListener DefaultListener { get; }
Property Value
Type | Description |
---|---|
AudioListener |
MasterVolume
Gets or sets the global audio volume. Default value is 1.0f
.
Declaration
public float MasterVolume { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
Volume is ranging from 0.0f (silence) to 1.0f (full volume). Values beyond those limits are clamped.
Methods
CreateAudioBuffer()
Creates an audio buffer.
Declaration
public abstract AudioBuffer CreateAudioBuffer()
Returns
Type | Description |
---|---|
AudioBuffer | The result AudioBuffer object. |
CreateAudioSource(WaveFormat)
Create a new AudioSource.
Declaration
public abstract AudioSource CreateAudioSource(WaveFormat format)
Parameters
Type | Name | Description |
---|---|---|
WaveFormat | format | The format of the audio source. |
Returns
Type | Description |
---|---|
AudioSource | A new AudioSource instance. |
Dispose()
Declaration
public abstract void Dispose()
SetMasterVolume(float)
Sets the master volume of the device.
Declaration
protected abstract void SetMasterVolume(float volume)
Parameters
Type | Name | Description |
---|---|---|
float | volume | The new volume. |