|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Channel-aware processor that writes AudioBuffer data to DynamicSoundStream containers. More...
#include <StreamWriteProcessor.hpp>
Inheritance diagram for MayaFlux::Buffers::StreamWriteProcessor:
Collaboration diagram for MayaFlux::Buffers::StreamWriteProcessor:Public Member Functions | |
| StreamWriteProcessor (std::shared_ptr< Kakshya::DynamicSoundStream > container, uint64_t start_position=0) | |
| Construct processor with target DynamicSoundStream container. | |
| void | processing_function (std::shared_ptr< Buffer > buffer) override |
| Write buffer audio data to the appropriate container channel. | |
| std::shared_ptr< Kakshya::DynamicSoundStream > | get_container () const |
| Get the target DynamicSoundStream container. | |
| void | set_write_position (uint64_t position) |
| Set the current write position in the container. | |
| uint64_t | get_write_position () const |
| Get the current write position in the container. | |
| void | reset_position () |
| Reset write position to the beginning. | |
| void | set_write_position_time (double time_seconds) |
| Set write position to a specific time offset. | |
| double | get_write_position_time () const |
| Get current write position as time offset. | |
Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor | |
| virtual | ~BufferProcessor ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| void | process (std::shared_ptr< Buffer > buffer) |
| Applies a computational transformation to the data in the provided buffer. | |
| virtual void | on_attach (std::shared_ptr< Buffer >) |
| Called when this processor is attached to a buffer. | |
| virtual void | on_detach (std::shared_ptr< Buffer >) |
| Called when this processor is detached from a buffer. | |
| virtual void | set_processing_token (ProcessingToken token) |
| Gets the preferred processing backend for this processor. | |
| virtual ProcessingToken | get_processing_token () const |
| Gets the current processing token for this buffer. | |
| virtual bool | is_compatible_with (std::shared_ptr< Buffer >) const |
| Checks if this processor can handle the specified buffer type. | |
Private Attributes | |
| std::shared_ptr< Kakshya::DynamicSoundStream > | m_container |
| uint64_t | m_write_position { 0 } |
| Current write position in frames. | |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor | |
| ProcessingToken | m_processing_token { ProcessingToken::AUDIO_BACKEND } |
Channel-aware processor that writes AudioBuffer data to DynamicSoundStream containers.
StreamWriteProcessor provides a bridge between the AudioBuffer processing system and DynamicSoundStream containers for real-time recording and data capture scenarios. It extracts audio data from buffers and streams it directly to the appropriate channel in the container with automatic capacity management and channel mapping.
Key Features:
Use Cases:
Channel Mapping: Each AudioBuffer's channel_id corresponds directly to a channel in the target DynamicSoundStream. Buffers with channel IDs exceeding the container's channel count will be skipped with a warning.
Definition at line 43 of file StreamWriteProcessor.hpp.