MayaFlux 0.5.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 195 of file SoundStreamContainer.cpp.

196{
197 if (frame_index >= m_num_frames) {
198 return {};
199 }
200
201 const auto& spans = get_span_cache();
202
204 if (spans.empty())
205 return {};
206
207 auto frame_span = extract_frame<double>(spans[0], frame_index, m_num_channels);
208 return { frame_span.data(), frame_span.size() };
209 }
210
211 static thread_local std::vector<double> frame_buffer;
212 auto frame_span = extract_frame<double>(spans, frame_index, frame_buffer);
213 return { frame_span.data(), frame_span.size() };
214}
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: