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

◆ audio_span()

static Region MayaFlux::Kakshya::Region::audio_span ( uint64_t  start_frame,
uint64_t  end_frame,
uint32_t  start_channel,
uint32_t  end_channel,
const std::string &  label = "" 
)
inlinestatic

Create a Region representing a span in audio (frames and channels).

Parameters
start_frameStart frame index (inclusive).
end_frameEnd frame index (inclusive).
start_channelStart channel index (inclusive).
end_channelEnd channel index (inclusive).
labelOptional label for this region.
Returns
Region covering the specified audio region.

Definition at line 176 of file Region.hpp.

181 {
182 std::unordered_map<std::string, std::any> attrs;
183 if (!label.empty())
184 attrs["label"] = label;
185 attrs["type"] = "audio_region";
186 return Region({ start_frame, start_channel },
187 { end_frame, end_channel }, attrs);
188 }