MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::StreamSlice Struct Reference

A bounded region of a DynamicSoundStream with associated playback parameters. More...

#include <StreamSlice.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::StreamSlice:

Public Member Functions

uint32_t end_channel () const
 
uint64_t end_frame () const
 
uint32_t start_channel () const
 
uint64_t start_frame () const
 
StreamSlicewith_loop_count (size_t n)
 
StreamSlicewith_looping (bool l)
 
StreamSlicewith_scale (double s)
 
StreamSlicewith_speed (double s)
 

Static Public Member Functions

static StreamSlice from_frame_range (std::shared_ptr< DynamicSoundStream > stream, uint64_t start_frame, uint64_t end_frame, uint8_t index=0)
 Construct a slice spanning a frame sub-region across all channels.
 
static StreamSlice from_region (std::shared_ptr< DynamicSoundStream > stream, uint64_t start_frame, uint64_t end_frame, uint32_t start_channel, uint32_t end_channel, uint8_t index=0)
 Construct a slice spanning a frame and channel sub-region.
 
static StreamSlice from_stream (std::shared_ptr< DynamicSoundStream > stream, uint8_t index=0)
 Construct a slice spanning the full stream across all channels.
 

Public Attributes

bool active {}
 
double cursor_remainder {}
 
uint8_t index {}
 
size_t loop_count {}
 
bool looping {}
 
Region region
 
double scale { 1.0 }
 
double speed { 1.0 }
 
std::shared_ptr< DynamicSoundStreamstream
 

Detailed Description

A bounded region of a DynamicSoundStream with associated playback parameters.

Describes a slice of audio data within a DynamicSoundStream as a Region. region.start_coordinates[0] / end_coordinates[0] are the frame bounds; region.start_coordinates[1] / end_coordinates[1] are the channel bounds.

The slice does not own a processor. The region is the contract; whatever drives this slice resolves the appropriate processor at activation time. Currently that is CursorAccessProcessor for sequential bounded reads, but the region descriptor is equally valid input to RegionOrganizationProcessor (non-linear navigation, selection patterns, transitions) or any future region-aware processor against a DynamicSoundStream.

speed and scale are playback parameters applied by the driving processor. cursor_remainder accumulates sub-frame advancement for speed != 1.0. looping and index are playback state and identity carried with the slice.

Definition at line 27 of file StreamSlice.hpp.


The documentation for this struct was generated from the following file: