1#ifndef _VAE_DEVICE_DUMMY
2#define _VAE_DEVICE_DUMMY
6namespace vae {
namespace core {
14 ) :
Device(backend, config) { }
64 const char*
getName()
const override {
return "dummy"; };
#define TKLB_ASSERT(condition)
Wrap assertions.
Device * createDevice(const EngineConfig &config) override
Creates a device instance for this backend.
DeviceInfo getDevice(unsigned int id) override
Returns a spefic device info for index.
const char * getName() const override
Returns name of the api.
unsigned int getDeviceCount() override
Gets number of devices, needed to iterate them.
static BackendDummy & instance()
DeviceInfo getDefaultOutputDevice() override
DeviceInfo getDefaultInputDevice() override
Backend interface used to query devices before creating a actual device object.
Backend without functionality.
bool closeDevice() override
Closes the currently open device.
DeviceDummy(Backend &backend, const EngineConfig &config)
void swapBufferInterleaved(const T *from, T *to, Size frames)
Simulate the callback from the audio device.
bool openDevice(bool input=false) override
Tries to open the default audio device whith desired in out channels.
bool openDevice(DeviceInfo &device) override
Opens a specific audio device.
Interface for audio devices.
AudioThreadWorker mWorker
const EngineConfig & mConfig
void init(Size sampleRate, Uchar channelsIn, Uchar channelsOut, Size bufferSize)
initializes buffers, queues and resamplers if needed Has to be called in openDevice once the samplera...
static void stringCopy(char *dst, const char *src, size_t size, bool terminate=true)
constexpr Size MaxBlock
Maximum block size.
Contains Typedefinitions and basic structures use by the public API and internally.
unsigned int Size
How the elements are addressed in the heapbuffer.
Basic struct describing a audio device.
unsigned char channelsOut
char name[255]
Device name reported from backend.
int id
Negative values for invalid device.
char api[4]
API abbreviation.
Settings for the engine defined at EnginePimpl::init.
Size internalSampleRate
Samplerate requested from device.
void swapBufferInterleaved(const T *from, T *to, Size frames)
Called from audio backend to push in interleaved audio data.