|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Channel-aware processor that writes AudioBuffer data to DynamicSoundStream containers. More...
#include <SoundStreamWriter.hpp>
Inheritance diagram for MayaFlux::Buffers::SoundStreamWriter:
Collaboration diagram for MayaFlux::Buffers::SoundStreamWriter:Public Member Functions | |
| std::shared_ptr< Kakshya::DynamicSoundStream > | get_container () const |
| Get the target DynamicSoundStream container. | |
| uint64_t | get_write_position () const |
| Get the current write position in the container. | |
| double | get_write_position_time () const |
| Get current write position as time offset. | |
| void | processing_function (const std::shared_ptr< Buffer > &buffer) override |
| Write buffer audio data to the appropriate container channel. | |
| void | reset_position () |
| Reset write position to the beginning. | |
| void | set_write_position (uint64_t position) |
| Set the current write position in the container. | |
| void | set_write_position_time (double time_seconds) |
| Set write position to a specific time offset. | |
| SoundStreamWriter (const std::shared_ptr< Kakshya::DynamicSoundStream > &container, uint64_t start_position=0) | |
| Construct processor with target DynamicSoundStream container. | |
Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor | |
| virtual ProcessingToken | get_processing_token () const |
| Gets the current processing token for this buffer. | |
| virtual bool | is_compatible_with (const std::shared_ptr< Buffer > &) const |
| Checks if this processor can handle the specified buffer type. | |
| virtual void | on_attach (const std::shared_ptr< Buffer > &) |
| Called when this processor is attached to a buffer. | |
| virtual void | on_detach (const std::shared_ptr< Buffer > &) |
| Called when this processor is detached from a buffer. | |
| void | process (const std::shared_ptr< Buffer > &buffer) |
| Applies a computational transformation to the data in the provided buffer. | |
| virtual void | set_processing_token (ProcessingToken token) |
| Gets the preferred processing backend for this processor. | |
| virtual | ~BufferProcessor ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
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.
SoundStreamWriter 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 SoundStreamWriter.hpp.