A factory class for audio devices.
More...
#include <AsyncAudioDeviceFactory.h>
A factory class for audio devices.
- Author
- Tobias Blomberg / SM0SVX
- Date
- 2009-12-26
This class is a factory class for creating audio devices. Use the REGISTER_AUDIO_DEVICE_TYPE macro to register a new audio device type. New audio device instances are created using the create method.
Definition at line 128 of file AsyncAudioDeviceFactory.h.
◆ CreatorFunc
AudioDevice *(*) Async::AudioDeviceFactory::CreatorFunc(const std::string &dev_designator) |
◆ ~AudioDeviceFactory()
Async::AudioDeviceFactory::~AudioDeviceFactory |
( |
void | | ) |
|
◆ AudioDeviceFactory()
Async::AudioDeviceFactory::AudioDeviceFactory |
( |
void | | ) |
|
|
protected |
◆ create()
AudioDevice * Async::AudioDeviceFactory::create |
( |
const std::string & | name, |
|
|
const std::string & | dev_name ) |
Create a new instance of the specified audio device type.
- Parameters
-
name | The audio device type (e.g. alsa, oss etc) |
dev_name | The audio device name (e.g. plughw:0, /dev/dsp etc) |
- Returns
- Returns an AudioDevice object
◆ instance()
◆ registerCreator()
bool Async::AudioDeviceFactory::registerCreator |
( |
const std::string & | name, |
|
|
CreatorFunc | creator ) |
Register a new audio device type.
- Parameters
-
name | The name of the audio device type (e.g. alsa, oss etc) |
creator | A function that create the AudioDevice object |
- Returns
- Return true on success or else false
◆ validDevTypes()
std::string Async::AudioDeviceFactory::validDevTypes |
( |
void | | ) |
const |
List valid device types.
- Returns
- Returns a space separated list of valid device type names
The documentation for this class was generated from the following file: