16static const int32_t MAX_GAIN_FACTOR = 64;
50 void add_data_callback(std::function<
void(
const std::vector<uint8_t> &)> &&data_callback);
67 void process_audio_(
const std::vector<uint8_t> &data, std::vector<uint8_t> &filtered_data);
void set_gain_factor(int32_t gain_factor)
MicrophoneSource(Microphone *mic, uint8_t bits_per_sample, int32_t gain_factor, bool passive)
std::shared_ptr< std::vector< uint8_t > > processed_samples_
std::bitset< 8 > channels_
void add_channel(uint8_t channel)
Enables a channel to be processed through the callback.
int32_t get_gain_factor()
void add_data_callback(std::function< void(const std::vector< uint8_t > &)> &&data_callback)
audio::AudioStreamInfo get_audio_stream_info()
Gets the AudioStreamInfo of the data after processing.
void process_audio_(const std::vector< uint8_t > &data, std::vector< uint8_t > &filtered_data)
Providing packet encoding functions for exchanging data with a remote host.
constexpr const T & clamp(const T &v, const T &lo, const T &hi, Compare comp)