MayaFlux 1.0.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 270 of file Graph.cpp.

271{
272 std::shared_ptr<Buffers::AudioBuffer> buffer = std::make_shared<Buffers::AudioBuffer>(channel);
273
274 if (add_to_output) {
276 }
277 read_from_audio_input(buffer, channel);
278
279 return buffer;
280}
std::shared_ptr< NetworkGeometryBuffer > buffer
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:240

References buffer, read_from_audio_input(), and register_audio_buffer().

+ Here is the call graph for this function: