Set a single value at the specified coordinates.
- Parameters
-
| coordinates | N-dimensional coordinates |
| value | Value to set |
Implements MayaFlux::Kakshya::NDDataContainer.
Definition at line 265 of file SoundStreamContainer.cpp.
266{
267 if (coordinates.size() != 2)
268 return;
269
270 uint64_t frame = coordinates[0];
271 uint64_t
channel = coordinates[1];
272
274 return;
275 }
276
278
280 if (spans.empty())
281 return;
282
284 if (linear_index < spans[0].
size()) {
285 const_cast<std::span<double>&>(spans[0])[linear_index] = value;
286 }
287
288 } else {
290 return;
291
293 const_cast<std::span<double>&
>(spans[
channel])[frame] = value;
294 }
295 }
296
299}
const std::vector< std::span< double > > & get_span_cache() const
Get the cached spans for each channel, recomputing if dirty.
std::atomic< bool > m_double_extraction_dirty
void invalidate_span_cache()
Invalidate the span cache when data or layout changes.
ContainerDataStructure m_structure
@ INTERLEAVED
Single DataVariant with interleaved data (LRLRLR for stereo)
OrganizationStrategy organization
References channel, get_span_cache(), MayaFlux::Kakshya::INTERLEAVED, invalidate_span_cache(), m_double_extraction_dirty, m_num_channels, m_num_frames, m_structure, MayaFlux::Kakshya::ContainerDataStructure::organization, and size.