Class AudioDriver
Represents an audio driver.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.HAL.Drivers.Audio
Assembly: Cosmos.HAL2.dll
Syntax
public abstract class AudioDriver
Properties
| Improve this Doc View SourceBufferProvider
The buffer provider to use.
Declaration
public abstract IAudioBufferProvider BufferProvider { get; set; }
Property Value
Type | Description |
---|---|
IAudioBufferProvider |
Enabled
Whether the audio device controlled by this audio driver is currently enabled and outputing/capturing audio.
Declaration
public abstract bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceDisable()
Stops any audio output.
Declaration
public abstract void Disable()
Enable()
Starts outputting audio.
Declaration
public abstract void Enable()
GetSupportedSampleFormats()
Gets the supported audio sample formats by the audio driver.
Declaration
public abstract SampleFormat[] GetSupportedSampleFormats()
Returns
Type | Description |
---|---|
SampleFormat[] | An array containing all supported sample formats. |
SetSampleFormat(SampleFormat)
Sets the used sample format by the audio driver. The sample format must be supported by the audio driver in order to be accepted; otherwise, the method will throw a System.NotSupportedException.
Declaration
public abstract void SetSampleFormat(SampleFormat sampleFormat)
Parameters
Type | Name | Description |
---|---|---|
SampleFormat | sampleFormat | The target sample format to use. |
Remarks
An audio driver can supply a list of supported formats with the GetSupportedSampleFormats() method.