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

◆ setup_processors()

void MayaFlux::Buffers::SoundFileBridge::setup_processors ( Buffers::ProcessingToken  token)
overridevirtual

Setup the processing chain with automatic input/output.

Configures:

User processors can be inserted into the main chain between these stages.

After calling setup_chain(), the buffer is ready for process_complete() cycles.

Reimplemented from MayaFlux::Buffers::AudioBuffer.

Definition at line 21 of file SoundFileBridge.cpp.

22{
23 m_capture_stream = std::make_shared<Kakshya::DynamicSoundStream>(
24 static_cast<uint32_t>(s_registered_sample_rate),
25 static_cast<uint32_t>(get_container()->get_structure().get_channel_count()));
26
27 initialize();
28 m_stream_writer = std::make_shared<SoundStreamWriter>(m_capture_stream);
29
31 if (!chain) {
32 chain = std::make_shared<BufferProcessingChain>();
34 }
35 chain->set_preferred_token(token);
36
37 chain->add_postprocessor(m_stream_writer, shared_from_this());
38
40}
void enforce_default_processing(bool should_process) override
Controls whether the audio buffer should use default processing.
void set_processing_chain(const std::shared_ptr< BufferProcessingChain > &chain, bool force=false) override
Sets the audio transformation chain for this buffer.
std::shared_ptr< BufferProcessingChain > get_processing_chain() override
Gets the audio transformation chain attached to this buffer.
void initialize()
Initialize the buffer after construction.
std::shared_ptr< Kakshya::StreamContainer > get_container() const
Get the backing StreamContainer.
std::shared_ptr< SoundStreamWriter > m_stream_writer
std::shared_ptr< Kakshya::DynamicSoundStream > m_capture_stream
uint64_t s_registered_sample_rate
Global default sample rate.
Tendency< A, C > chain(const Tendency< A, B > &first, const Tendency< B, C > &second)
Sequential composition: evaluate first, feed result into second.
Definition Tendency.hpp:82

References MayaFlux::Buffers::AudioBuffer::enforce_default_processing(), MayaFlux::Buffers::SoundContainerBuffer::get_container(), MayaFlux::Buffers::AudioBuffer::get_processing_chain(), MayaFlux::Buffers::SoundContainerBuffer::initialize(), m_capture_stream, m_stream_writer, MayaFlux::Buffers::s_registered_sample_rate, and MayaFlux::Buffers::AudioBuffer::set_processing_chain().

+ Here is the call graph for this function: