An AudioOut is a device that can output audio.
More...
#include "components/audio_out.hpp"
|
| void | play (std::vector< uint8_t > const &audio_data, boost::optional< audio_info > info) |
| | Play audio data.
|
| |
| virtual void | play (std::vector< uint8_t > const &audio_data, boost::optional< audio_info > info, const ProtoStruct &extra)=0 |
| | Play audio through the audioout component.
|
| |
|
audio_properties | get_properties () |
| | Returns properties of the audio out device (supported codecs, sample rate, number of channels)
|
| |
| virtual audio_properties | get_properties (const ProtoStruct &extra)=0 |
| | Returns properties of the audio out device (supported codecs, sample rate, number of channels)
|
| |
| virtual ProtoStruct | do_command (const ProtoStruct &command)=0 |
| | Send/receive arbitrary commands to the resource.
|
| |
| std::vector< GeometryConfig > | get_geometries () |
| |
| virtual std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra)=0 |
| | Returns GeometryConfigs associated with the calling audioout.
|
| |
| API | api () const override |
| | Returns the API associated with a particular resource.
|
| |
| Name | get_resource_name () const override |
| | Returns the Name for a particular resource.
|
| |
|
| Resource (std::string name) |
| |
|
virtual std::string | name () const |
| | Return the resource's name.
|
| |
|
void | set_log_level (log_level) const |
| | Set the log level for log messages originating from this Resource.
|
| |
|
|
| AudioOut (std::string name) |
| |
|
| Component (std::string name) |
| |
|
Name | get_resource_name (const std::string &type) const |
| |
An AudioOut is a device that can output audio.
This acts as an abstract parent class to be inherited from by any drivers representing specific AudioOut implementations. This class cannot be used on its own.
◆ api()
| API viam::sdk::AudioOut::api |
( |
| ) |
const |
|
overridevirtual |
◆ do_command()
| virtual ProtoStruct viam::sdk::AudioOut::do_command |
( |
const ProtoStruct & | command | ) |
|
|
pure virtual |
Send/receive arbitrary commands to the resource.
- Parameters
-
| command | the command to execute. |
- Returns
- The result of the executed command.
Implemented in viam::sdk::impl::AudioOutClient.
◆ get_geometries() [1/2]
◆ get_geometries() [2/2]
| virtual std::vector< GeometryConfig > viam::sdk::AudioOut::get_geometries |
( |
const ProtoStruct & | extra | ) |
|
|
pure virtual |
◆ get_properties()
| virtual audio_properties viam::sdk::AudioOut::get_properties |
( |
const ProtoStruct & | extra | ) |
|
|
pure virtual |
◆ play() [1/2]
| void viam::sdk::AudioOut::play |
( |
std::vector< uint8_t > const & | audio_data, |
|
|
boost::optional< audio_info > | info ) |
|
inline |
Play audio data.
- Parameters
-
| audio_data | The audio data to play as bytes |
| info | Optional info about the audio_data (codec, sample rate, channels). Required for raw PCM data. |
◆ play() [2/2]
| virtual void viam::sdk::AudioOut::play |
( |
std::vector< uint8_t > const & | audio_data, |
|
|
boost::optional< audio_info > | info, |
|
|
const ProtoStruct & | extra ) |
|
pure virtual |
Play audio through the audioout component.
- Parameters
-
| audio_data | The audio data to play |
| info | Optional info about the audio_data (codec, sample rate, channels). Required for raw PCM data. |
| extra | Any additional arguments to the method |
Implemented in viam::sdk::impl::AudioOutClient, and viam::sdk::impl::AudioOutClient.
The documentation for this class was generated from the following file: