MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_input_listener_buffer()

MAYAFLUX_API std::shared_ptr< Buffers::AudioBuffer > MayaFlux::create_input_listener_buffer ( uint32_t  channel = 0,
bool  add_to_output = false 
)

Creates a new AudioBuffer for input listening.

Parameters
channelChannel index to create the buffer for (default: 0)
add_to_outputWhether to add this buffer to the output channel (default: false)
Returns
Shared pointer to the created AudioBuffer

This function creates a new AudioBuffer that can be used to listen to audio input. If add_to_output is true, the buffer will be automatically added to the output channel for processing.

Definition at line 180 of file Graph.cpp.

181{
182 std::shared_ptr<Buffers::AudioBuffer> buffer = std::make_shared<Buffers::AudioBuffer>(channel);
183
184 if (add_to_output) {
185 register_audio_buffer(buffer, channel);
186 }
187 read_from_audio_input(buffer, channel);
188
189 return buffer;
190}
void register_audio_buffer(const std::shared_ptr< Buffers::AudioBuffer > &buffer, uint32_t channel)
Registers an AudioBuffer with the default engine's buffer manager.
Definition Graph.cpp:150

References read_from_audio_input(), and register_audio_buffer().

+ Here is the call graph for this function: