Object representing a hardware audio device. There is only ever one device per hardware device reported by the system, for both input and output. More...
#include <Device.h>
Classes | |
struct | Format |
Defines the format parameters that are settable when passed in with updateFormat() More... | |
Public Member Functions | |
virtual | ~Device () |
const std::string & | getName () |
Returns the name of this Device, which is a human readable string reported by the system. More... | |
const std::string & | getKey () |
Returns the key of this Device, which is a unique platform-specific defined identifier. More... | |
size_t | getNumInputChannels () |
Returns the number of input channels this Device supports. More... | |
size_t | getNumOutputChannels () |
Returns the number of output channels this Device supports. More... | |
size_t | getSampleRate () |
Returns the current samplerate. More... | |
size_t | getFramesPerBlock () |
Returns the current frames per block. More... | |
void | updateFormat (const Format &format) |
Configures the format properties of this Device. This effects the hardware on your system. More... | |
signals::signal< void()> & | getSignalParamsWillChange () |
Returns a signal that notifies connected slots before the format of this Device will change. This can occur from a call to updateFormat() or by the system. More... | |
signals::signal< void()> & | getSignalParamsDidChange () |
Returns a signal that notifies connected slots after the format of this Device has changed. This can occur from a call to updateFormat() or by the system. More... | |
Static Public Member Functions | |
static DeviceRef | getDefaultOutput () |
Returns a reference to the default output Device on your system. More... | |
static DeviceRef | getDefaultInput () |
Returns a reference to the default input Device on your system. More... | |
static DeviceRef | findDeviceByName (const std::string &name) |
Finds and returns a reference to the first Device named name. More... | |
static DeviceRef | findDeviceByKey (const std::string &key) |
Finds and returns a reference to the unique Device located by key, an platform-specific defined identifier. More... | |
static const std::vector < DeviceRef > & | getDevices () |
Returns a vector of all Device's. More... | |
static std::vector< DeviceRef > | getOutputDevices () |
Returns a vector of all output Device's. More... | |
static std::vector< DeviceRef > | getInputDevices () |
Returns a vector of all input Device's. More... | |
static std::string | printDevicesToString () |
Returns a string representation of all devices for debugging purposes. More... | |
Friends | |
class | DeviceManager |
Object representing a hardware audio device. There is only ever one device per hardware device reported by the system, for both input and output.
|
virtual |
|
static |
Returns a reference to the default output Device on your system.
|
static |
Returns a reference to the default input Device on your system.
|
static |
Finds and returns a reference to the first Device named name.
|
static |
Finds and returns a reference to the unique Device located by key, an platform-specific defined identifier.
|
static |
Returns a vector of all Device's.
|
static |
Returns a vector of all output Device's.
|
static |
Returns a vector of all input Device's.
const string & cinder::audio::Device::getName | ( | ) |
Returns the name of this Device, which is a human readable string reported by the system.
const string & cinder::audio::Device::getKey | ( | ) |
Returns the key of this Device, which is a unique platform-specific defined identifier.
size_t cinder::audio::Device::getNumInputChannels | ( | ) |
Returns the number of input channels this Device supports.
size_t cinder::audio::Device::getNumOutputChannels | ( | ) |
Returns the number of output channels this Device supports.
size_t cinder::audio::Device::getSampleRate | ( | ) |
Returns the current samplerate.
size_t cinder::audio::Device::getFramesPerBlock | ( | ) |
Returns the current frames per block.
Configures the format properties of this Device. This effects the hardware on your system.
signals::signal<void()>& cinder::audio::Device::getSignalParamsWillChange | ( | ) |
Returns a signal that notifies connected slots before the format of this Device will change. This can occur from a call to updateFormat() or by the system.
signals::signal<void()>& cinder::audio::Device::getSignalParamsDidChange | ( | ) |
Returns a signal that notifies connected slots after the format of this Device has changed. This can occur from a call to updateFormat() or by the system.
|
static |
Returns a string representation of all devices for debugging purposes.
|
friend |