The IDeviceFactory interface opens an output device.
More...
#include <IDeviceFactory.h>
|
virtual | ~IDeviceFactory () |
| Destroys the device factory.
|
|
virtual std::shared_ptr< IDevice > | openDevice ()=0 |
| Opens an audio device for playback.
|
|
virtual int | getPriority ()=0 |
| Returns the priority of the device to be the default device for a system.
|
|
virtual void | setSpecs (DeviceSpecs specs)=0 |
| Sets the wanted device specifications for opening the device.
|
|
virtual void | setBufferSize (int buffersize)=0 |
| Sets the size for the internal playback buffers.
|
|
virtual void | setName (const std::string &name)=0 |
| Sets a name for the device.
|
|
The IDeviceFactory interface opens an output device.
◆ getPriority()
virtual int IDeviceFactory::getPriority |
( |
| ) |
|
|
pure virtual |
Returns the priority of the device to be the default device for a system.
The higher the priority the more likely it is for this device to be used as the default device.
- Returns
- Priority to be the default device.
◆ openDevice()
virtual std::shared_ptr< IDevice > IDeviceFactory::openDevice |
( |
| ) |
|
|
pure virtual |
Opens an audio device for playback.
- Exceptions
-
Exception | Thrown if the audio device cannot be opened. |
◆ setBufferSize()
virtual void IDeviceFactory::setBufferSize |
( |
int | buffersize | ) |
|
|
pure virtual |
Sets the size for the internal playback buffers.
The bigger the buffersize, the less likely clicks happen, but the latency increases too.
- Parameters
-
buffersize | The size of the internal buffer. |
◆ setName()
virtual void IDeviceFactory::setName |
( |
const std::string & | name | ) |
|
|
pure virtual |
Sets a name for the device.
- Parameters
-
name | The internal name for the device. |
◆ setSpecs()
virtual void IDeviceFactory::setSpecs |
( |
DeviceSpecs | specs | ) |
|
|
pure virtual |
Sets the wanted device specifications for opening the device.
- Parameters
-
specs | The wanted audio specification. |
The documentation for this interface was generated from the following file: