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

◆ get_frame_typed()

std::span< const double > MayaFlux::Kakshya::SoundStreamContainer::get_frame_typed ( uint64_t  frame_index) const
private

Definition at line 232 of file SoundStreamContainer.cpp.

233{
234 if (frame_index >= m_num_frames) {
235 return {};
236 }
237
238 const auto& spans = get_span_cache();
239
241 if (spans.empty())
242 return {};
243
244 auto frame_span = extract_frame<double>(spans[0], frame_index, m_num_channels);
245 return { frame_span.data(), frame_span.size() };
246 }
247
248 static thread_local std::vector<double> frame_buffer;
249 auto frame_span = extract_frame<double>(spans, frame_index, frame_buffer);
250 return { frame_span.data(), frame_span.size() };
251}
const std::vector< std::span< double > > & get_span_cache() const
Get the cached spans for each channel, recomputing if dirty.
@ INTERLEAVED
Single DataVariant with interleaved data (LRLRLR for stereo)

References get_span_cache(), MayaFlux::Kakshya::INTERLEAVED, m_num_channels, m_num_frames, m_structure, and MayaFlux::Kakshya::ContainerDataStructure::organization.

+ Here is the call graph for this function: