78 unsigned int output_device_id,
79 unsigned int input_device_id,
206 [[nodiscard]]
virtual bool is_open()
const = 0;
static std::unique_ptr< IAudioBackend > create_backend(Utils::AudioBackendType type)
Creates a specific audio backend implementation.
Factory pattern implementation for audio backend instantiation.
virtual std::vector< DeviceInfo > get_output_devices() const =0
Retrieves information about all available output devices.
virtual unsigned int get_default_output_device() const =0
Gets the system's primary output device identifier.
virtual ~AudioDevice()=default
Virtual destructor for proper cleanup of derived classes.
virtual unsigned int get_default_input_device() const =0
Gets the system's primary input device identifier.
virtual std::vector< DeviceInfo > get_input_devices() const =0
Retrieves information about all available input devices.
Manages audio endpoint discovery and enumeration.
virtual void start()=0
Activates the audio stream and begins data transfer.
virtual bool is_running() const =0
Checks if the stream is actively processing audio data.
virtual void close()=0
Terminates the audio stream and releases all resources.
virtual ~AudioStream()=default
Virtual destructor for proper cleanup of derived classes.
virtual void open()=0
Initializes the audio stream and allocates required resources.
virtual void set_process_callback(std::function< int(void *, void *, unsigned int)> processCallback)=0
Sets the function to process audio data.
virtual void stop()=0
Deactivates the audio stream and halts data transfer.
virtual bool is_open() const =0
Checks if the stream is initialized and ready for activation.
Manages digital audio data flow between the engine and hardware.
virtual std::unique_ptr< AudioDevice > create_device_manager()=0
Creates a device manager for audio endpoint discovery.
virtual std::string get_version_string() const =0
Retrieves the backend implementation version.
virtual std::unique_ptr< AudioStream > create_stream(unsigned int output_device_id, unsigned int input_device_id, const GlobalStreamInfo &stream_info, void *user_data)=0
Creates an audio stream for a specific device.
virtual ~IAudioBackend()=default
Virtual destructor for proper cleanup of derived classes.
virtual int get_api_type() const =0
Retrieves the backend API type identifier.
virtual void cleanup()=0
Releases all resources held by the backend.
Interface for audio system abstraction layer.
std::string name
System identifier for the audio endpoint.
uint32_t duplex_channels
Number of channels supporting simultaneous input and output.
std::vector< uint32_t > supported_samplerates
Collection of all sample rates supported by this device.
bool is_default_output
Indicates if this device is the system's primary output endpoint.
uint32_t input_channels
Number of discrete input channels available for signal capture.
bool is_default_input
Indicates if this device is the system's primary input endpoint.
uint32_t output_channels
Number of discrete output channels available for signal playback.
uint32_t preferred_sample_rate
Optimal sample rate for this device as reported by the system.
Contains digital audio device configuration parameters.
Comprehensive configuration for digital audio stream processing.