28 #include "modules/drivers/microphone/proto/audio.pb.h" 29 #include "modules/drivers/microphone/proto/microphone_config.pb.h" 34 namespace microphone {
36 using apollo::common::util::FillHeader;
40 using apollo::drivers::microphone::config::AudioData;
41 using apollo::drivers::microphone::config::ChannelData;
42 using apollo::drivers::microphone::config::MicrophoneConfig;
51 void fill_channel_data(
int chunk_i);
54 int n_chunks_, n_channels_, chunk_, chunk_size_, n_chunk_,
58 std::shared_ptr<AudioData> audio_data_ptr_;
59 std::shared_ptr<Writer<AudioData>> writer_ptr_;
60 std::unique_ptr<Respeaker> microphone_device_ptr_;
61 std::vector<std::string *> channel_data_ptrs_;
62 std::shared_ptr<MicrophoneConfig> microphone_config_ptr_;
65 std::future<void> async_result_;
66 std::atomic<bool> running_ = {
false};
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Reader subscribes a channel, it has two main functions:
Definition: reader.h:68
Some string util functions.
Definition: microphone_component.h:44
#define CYBER_REGISTER_COMPONENT(name)
Definition: component.h:551
The Component can process up to four channels of messages. The message type is specified when the com...
Definition: component.h:58
apollo::cyber::Writer< T > Writer
Definition: sensor_canbus.h:67