29#include <unordered_map>
47 static std::unordered_map<std::string, std::shared_ptr<IDeviceFactory>> m_factories;
49 static std::shared_ptr<IDevice> m_device;
65 static void registerDevice(
const std::string &name, std::shared_ptr<IDeviceFactory> factory);
87 static void setDevice(std::shared_ptr<IDevice> device);
The main header file of the library defining the namespace and basic data types.
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition Audaspace.h:119
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition Audaspace.h:93
This class manages all device plugins and maintains a device if asked to do so.
Definition DeviceManager.h:45
static std::shared_ptr< IDeviceFactory > getDeviceFactory(const std::string &name)
Returns the factory for a specific device.
static void releaseDevice()
Releases the currently handled device.
static std::shared_ptr< I3DDevice > get3DDevice()
Returns the currently handled 3D device.
static void setDevice(std::shared_ptr< IDevice > device)
Sets a device that should be handled by the manager.
static std::vector< std::string > getAvailableDeviceNames()
Returns a list of available devices.
static void openDevice(const std::string &name)
Opens a device which will then be handled by the manager.
static void registerDevice(const std::string &name, std::shared_ptr< IDeviceFactory > factory)
Registers a device factory.
static void openDefaultDevice()
Opens the default device which will then be handled by the manager.
static std::shared_ptr< IDeviceFactory > getDefaultDeviceFactory()
Returns the default device based on the priorities of the registered factories.
static std::shared_ptr< IDevice > getDevice()
Returns the currently handled device.
The I3DDevice interface represents an output device for 3D sound.
Definition I3DDevice.h:53
The IDeviceFactory interface opens an output device.
Definition IDeviceFactory.h:36
The IDevice interface represents an output device for sound sources.
Definition IDevice.h:47