VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
vae::core::BackendDummy Class Reference

#include <vae_device_dummy.hpp>

Inheritance diagram for vae::core::BackendDummy:
Collaboration diagram for vae::core::BackendDummy:

Public Member Functions

unsigned int getDeviceCount () override
 Gets number of devices, needed to iterate them. More...
 
DeviceInfo getDevice (unsigned int id) override
 Returns a spefic device info for index. More...
 
const char * getName () const override
 Returns name of the api. More...
 
DeviceInfo getDefaultInputDevice () override
 
DeviceInfo getDefaultOutputDevice () override
 
DevicecreateDevice (const EngineConfig &config) override
 Creates a device instance for this backend. More...
 

Static Public Member Functions

static BackendDummyinstance ()
 

Private Member Functions

 BackendDummy ()
 

Detailed Description

Definition at line 44 of file vae_device_dummy.hpp.

Constructor & Destructor Documentation

◆ BackendDummy()

vae::core::BackendDummy::BackendDummy ( )
inlineprivate

Definition at line 45 of file vae_device_dummy.hpp.

45{ }

Member Function Documentation

◆ createDevice()

Device * vae::core::BackendDummy::createDevice ( const EngineConfig )
inlineoverridevirtual

Creates a device instance for this backend.

Implements vae::core::Backend.

Definition at line 74 of file vae_device_dummy.hpp.

74 {
75 return new DeviceDummy(*this, config);
76 }

◆ getDefaultInputDevice()

DeviceInfo vae::core::BackendDummy::getDefaultInputDevice ( )
inlineoverridevirtual

Implements vae::core::Backend.

Definition at line 66 of file vae_device_dummy.hpp.

66 {
67 return getDevice(0);
68 };
DeviceInfo getDevice(unsigned int id) override
Returns a spefic device info for index.
Here is the call graph for this function:

◆ getDefaultOutputDevice()

DeviceInfo vae::core::BackendDummy::getDefaultOutputDevice ( )
inlineoverridevirtual

Implements vae::core::Backend.

Definition at line 70 of file vae_device_dummy.hpp.

70 {
71 return getDevice(0);
72 };
Here is the call graph for this function:

◆ getDevice()

DeviceInfo vae::core::BackendDummy::getDevice ( unsigned int  index)
inlineoverridevirtual

Returns a spefic device info for index.

Implements vae::core::Backend.

Definition at line 54 of file vae_device_dummy.hpp.

54 {
55 TKLB_ASSERT(id == 0) // there's only one device
56 DeviceInfo info;
57 info.channelsIn = 2;
58 info.channelsOut = 2;
59 tklb::memory::stringCopy(info.name, "Dummy Device", sizeof(DeviceInfo::name));
60 tklb::memory::stringCopy(info.api, getName(), sizeof(DeviceInfo::api));
61 return info;
62 }
#define TKLB_ASSERT(condition)
Wrap assertions.
Definition: TAssert.h:18
const char * getName() const override
Returns name of the api.
static void stringCopy(char *dst, const char *src, size_t size, bool terminate=true)
Definition: TMemoryUtil.hpp:26
Using template interfaces isn't an option so this simply defines a default Convolver type.
Definition: TAllocator.hpp:15
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDeviceCount()

unsigned int vae::core::BackendDummy::getDeviceCount ( )
inlineoverridevirtual

Gets number of devices, needed to iterate them.

Device index != does not have to be the device index!

Implements vae::core::Backend.

Definition at line 52 of file vae_device_dummy.hpp.

52{ return 1; }

◆ getName()

const char * vae::core::BackendDummy::getName ( ) const
inlineoverridevirtual

Returns name of the api.

Implements vae::core::Backend.

Definition at line 64 of file vae_device_dummy.hpp.

64{ return "dummy"; };
Here is the caller graph for this function:

◆ instance()

static BackendDummy & vae::core::BackendDummy::instance ( )
inlinestatic

Definition at line 47 of file vae_device_dummy.hpp.

47 {
48 static BackendDummy backend;
49 return backend;
50 }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: