ALSADevice

Implements an ALSA device.

Constructors

this
this(snd_pcm_t* pcmHandle)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

createOutputStream
OutputStream createOutputStream()
Undocumented in source. Be warned that the author may not have intended to support it.
requestSpecs
AudioSpecs requestSpecs(AudioSpecs reqSpecs, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

alsaerrCode
int alsaerrCode;

Contains ALSA-related error codes.

pcmHandle
snd_pcm_t* pcmHandle;
Undocumented in source.
pcmParams
snd_pcm_hw_params_t* pcmParams;
Undocumented in source.

Inherited Members

From AudioDevice

_sampleRateRange
int[] _sampleRateRange;

Stores either all supported sample rates, or two values of lowest and highest supported sample rates if any value can be set without stepping. NOTE: It is not guaranteed, that at all sample ranges, all formats will be available.

_supportedFormats
SampleFormat[] _supportedFormats;

Stores supported formats.

_nOfInputs
short _nOfInputs;

Number of input channels, or zero if there's none.

_nOfOutputs
short _nOfOutputs;

Number of output channels, or zero if there's none.

errCode
int errCode;

The last error code if there's any, or 0. Shall not be set externally, although should not impede on operation.

_specs
AudioSpecs _specs;

The audio specifications set and available to this device.

_shareMode
AudioShareMode _shareMode;

Tells whether the device is in shared or exclusive mode. In some cases, this can be set, in others it's either shared or exclusive.

callback_onDeviceDisconnect
void delegate() callback_onDeviceDisconnect;

Called when device is disconnected.

sampleRateRange
int[] sampleRateRange [@property getter]

Returns the range of sample rates that this audio device supports. Might return null if it's enforced at audio spec request. NOTE: It is not guaranteed, that at all sample ranges, all formats will be available.

supportedFormats
SampleFormat[] supportedFormats [@property getter]

Returns the range of audio formats that this audio device supports. Might return null if it's enforced at audio spec request. NOTE: It is not guaranteed, that at all sample ranges, all formats will be available.

nOfInputs
short nOfInputs [@property getter]

Returns the number of input channels this device has, or zero if there's none, or -1 if it's enforced at audio spec request. NOTE: Depending on the backend, devices' inputs and outputs (or even different inputs and outputs) might show up as different devices.

nOfOutputs
short nOfOutputs [@property getter]

Returns the number of output channels this device has, or zero if there's none, or -1 if it's enforced at audio spec request. NOTE: Depending on the backend, devices' inputs and outputs (or even different inputs and outputs) might show up as different devices.

specs
AudioSpecs specs [@property getter]

Returns the currently set audio specifications.

shareMode
AudioShareMode shareMode [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
requestSpecs
AudioSpecs requestSpecs(AudioSpecs reqSpecs, int flags)

Sets the device's audio specifications to the closest possible specifications.

createOutputStream
OutputStream createOutputStream()

Creates an OutputStream specific to the given driver/device, with the requested parameters, then returns it. Or null in case of an error, then it also sets errCode to a given error code. Might also set a separate error code variable, depending on the OS/backend.

Meta