Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
device.hh
Go to the documentation of this file.
1 // This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
2#ifndef __ASE_DEVICE_HH__
3#define __ASE_DEVICE_HH__
4
5#include <ase/gadget.hh>
6#include <ase/processor.hh>
7
8namespace Ase {
9
10class DeviceImpl : public GadgetImpl, public virtual Device {
11 bool activated_ = false;
12protected:
13 explicit DeviceImpl () {} // abstract base
14 void _set_parent (GadgetImpl *parent) override;
15 virtual DeviceS list_devices () { return {}; }
16public:
17 void _activate () override;
18 void _deactivate () override;
19 DeviceS get_devices () const override { return const_cast<DeviceImpl&> (*this).list_devices(); }
20 void set_devices (const DeviceS &newdevices) override { devices.notify(); }
21 bool is_active () override { return activated_; }
22 bool gui_supported () override { return false; }
23 bool gui_visible () override { return false; }
24 void gui_toggle () override {}
25 void _disconnect_remove () override;
26 static DeviceInfo extract_info (const String &aseid, const AudioProcessor::StaticInfo &static_info);
27};
28
29} // Ase
30
31#endif // __ASE_DEVICE_HH__
bool gui_visible() override
Is GUI currently visible.
Definition device.hh:23
void set_devices(const DeviceS &newdevices) override
Set the list of devices.
Definition device.hh:20
DeviceS get_devices() const override
List devices in order of processing, notified via "devs".
Definition device.hh:19
bool gui_supported() override
Has GUI display facilities.
Definition device.hh:22
bool is_active() override
Check whether this is the active synthesis engine project.
Definition device.hh:21
void _disconnect_remove() override
Disconnect the device and remove all object references.
Definition device.cc:44
void _deactivate() override
Stop processing the corresponding AudioProcessor.
Definition device.cc:28
void _activate() override
Add AudioProcessor to the Engine and start processing.
Definition device.cc:21
void _set_parent(GadgetImpl *parent) override
Assign parent container.
Definition device.cc:14
void gui_toggle() override
Toggle GUI display.
Definition device.hh:24
Interface to access Device instances.
Definition api.hh:214
Base type for classes that have a Property.
Definition gadget.hh:12
The Anklang C++ API namespace.
Definition api.hh:9
Info for device types.
Definition api.hh:203