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

◆ reset_read_position()

void MayaFlux::Kakshya::SoundStreamContainer::reset_read_position ( )
overridevirtual

Reset read position to the beginning of the stream.

Enables repeatable playback or reprocessing from the start.

Implements MayaFlux::Kakshya::StreamContainer.

Definition at line 404 of file SoundStreamContainer.cpp.

405{
406 std::vector<uint64_t> start_pos;
407
410 } else {
411 start_pos = std::vector<uint64_t>(m_num_channels, 0);
412 }
413
414 if (m_read_position.size() != start_pos.size()) {
415 m_read_position = std::vector<std::atomic<uint64_t>>(start_pos.size());
416 }
417
418 for (size_t i = 0; i < start_pos.size(); ++i) {
419 m_read_position[i].store(start_pos[i]);
420 }
421}
std::vector< std::atomic< uint64_t > > m_read_position
std::vector< uint64_t > start_coordinates
Starting frame index (inclusive)
Definition Region.hpp:75

References m_loop_region, m_looping_enabled, m_num_channels, m_read_position, and MayaFlux::Kakshya::Region::start_coordinates.