33// / @brief Defines an `AudioOut` component.
44#pragma once
55
6- #include < memory>
76#include < string>
87
8+ #include < boost/optional/optional.hpp>
9+
910#include < viam/sdk/common/audio.hpp>
1011#include < viam/sdk/common/proto_value.hpp>
1112#include < viam/sdk/common/utils.hpp>
@@ -29,19 +30,19 @@ class AudioOut : public Component {
2930 // / @brief Play audio data
3031 // / @param audio_data The audio data to play as bytes
3132 // / @param info Optional info about the audio_data (codec, sample rate, channels). Required for
32- // / raw PCM data, pass nullptr if not needed .
33+ // / raw PCM data.
3334 inline void play (std::vector<uint8_t > const & audio_data,
34- std::shared_ptr <audio_info> info = nullptr ) {
35+ boost::optional <audio_info> info) {
3536 return play (audio_data, info, {});
3637 }
3738
3839 // / @brief Play audio through the audioout component
3940 // / @param audio_data The audio data to play
4041 // / @param info Optional info about the audio_data (codec, sample rate, channels). Required for
41- // / raw PCM data, pass nullptr if not needed .
42+ // / raw PCM data.
4243 // / @param extra Any additional arguments to the method
4344 virtual void play (std::vector<uint8_t > const & audio_data,
44- std::shared_ptr <audio_info> info,
45+ boost::optional <audio_info> info,
4546 const ProtoStruct& extra) = 0;
4647
4748 // / @brief Returns properties of the audio out device (supported codecs, sample rate, number of
0 commit comments