audio_common for ROS 2
Loading...
Searching...
No Matches
audio_common::AudioPlayerNode Class Reference

#include <audio_player_node.hpp>

Inheritance diagram for audio_common::AudioPlayerNode:
Collaboration diagram for audio_common::AudioPlayerNode:

Public Member Functions

 AudioPlayerNode ()
 
 ~AudioPlayerNode () override
 

Private Member Functions

void audio_callback (const audio_common_msgs::msg::AudioStamped::SharedPtr msg)
 
template<typename T>
void write_data (const std::vector< T > &data, int channels, int chunk, const std::string &stream_key)
 

Private Attributes

rclcpp::Subscription< audio_common_msgs::msg::AudioStamped >::SharedPtr audio_sub_
 
std::unordered_map< std::string, PaStream * > stream_dict_
 
int channels_
 
int device_
 

Constructor & Destructor Documentation

◆ AudioPlayerNode()

AudioPlayerNode::AudioPlayerNode ( )

◆ ~AudioPlayerNode()

AudioPlayerNode::~AudioPlayerNode ( )
override

Member Function Documentation

◆ audio_callback()

void AudioPlayerNode::audio_callback ( const audio_common_msgs::msg::AudioStamped::SharedPtr msg)
private

◆ write_data()

template<typename T>
void AudioPlayerNode::write_data ( const std::vector< T > & data,
int channels,
int chunk,
const std::string & stream_key )
private

Member Data Documentation

◆ audio_sub_

rclcpp::Subscription<audio_common_msgs::msg::AudioStamped>::SharedPtr audio_common::AudioPlayerNode::audio_sub_
private

◆ channels_

int audio_common::AudioPlayerNode::channels_
private

◆ device_

int audio_common::AudioPlayerNode::device_
private

◆ stream_dict_

std::unordered_map<std::string, PaStream *> audio_common::AudioPlayerNode::stream_dict_
private

The documentation for this class was generated from the following files: