![]() |
Cinder
0.9.1
|
#include <Device.h>
Inherits enable_shared_from_this< Device >, and cinder::Noncopyable.
Classes | |
struct | Format |
Public Member Functions | |
virtual | ~Device () |
const std::string & | getName () |
const std::string & | getKey () |
size_t | getNumInputChannels () |
size_t | getNumOutputChannels () |
size_t | getSampleRate () |
size_t | getFramesPerBlock () |
void | updateFormat (const Format &format) |
signals::Signal< void()> & | getSignalParamsWillChange () |
signals::Signal< void()> & | getSignalParamsDidChange () |
Static Public Member Functions | |
static DeviceRef | getDefaultOutput () |
static DeviceRef | getDefaultInput () |
static DeviceRef | findDeviceByName (const std::string &name) |
static DeviceRef | findDeviceByKey (const std::string &key) |
static const std::vector< DeviceRef > & | getDevices () |
static std::vector< DeviceRef > | getOutputDevices () |
static std::vector< DeviceRef > | getInputDevices () |
static std::string | printDevicesToString () |
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.
void cinder::audio::Device::updateFormat | ( | const Format & | format | ) |
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 |