Luna::AHI::IDevice
Represents one audio device that can playback sounds.
interface Luna::AHI::IDevice : public virtual Interface
Base type
Member functions
-
virtual u32 get_sample_rate()=0
Gets the sample rate of the playback and capture stream.
-
virtual DeviceFlag get_flags()=0
Gets device flags.
-
virtual u32 get_playback_num_channels()=0
Gets the number of channels for the playback stream, which is also the number of audio samples in one audio frame.
-
virtual BitDepth get_playback_bit_depth()=0
Gets the bit depth of one sample in playback stream.
-
virtual u32 get_capture_num_channels()=0
Gets the number of channels for the capture stream, which is also the number of audio samples in one audio frame.
-
virtual BitDepth get_capture_bit_depth()=0
Gets the bit depth of one sample in capture stream.
-
virtual usize add_playback_data_callback(const Function< playback_callback_t > &callback)=0
Adds a callback that will be called when audio data is required by the audio driver for playback.
-
virtual usize add_playback_data_callback(Function< playback_callback_t > &&callback)=0
Adds a callback that will be called when audio data is required by the audio driver for playback.
-
virtual void remove_playback_data_callback(usize handle)=0
Removes one callback added by add_playback_data_callback.
-
virtual usize add_capture_data_callback(const Function< capture_callback_t > &callback)=0
Adds a callback that will be called when audio data is captured by the audio driver.
-
virtual usize add_capture_data_callback(Function< capture_callback_t > &&callback)=0
Adds a callback that will be called when audio data is captured by the audio driver.
-
virtual void remove_capture_data_callback(usize handle)=0
Removes one callback added by add_capture_data_callback.