MayaFlux 0.1.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 455 of file SoundStreamContainer.cpp.

456{
457 std::vector<uint64_t> start_pos;
458
461 } else {
462 start_pos = std::vector<uint64_t>(m_num_channels, 0);
463 }
464
465 if (m_read_position.size() != start_pos.size()) {
466 m_read_position = std::vector<std::atomic<uint64_t>>(start_pos.size());
467 }
468
469 for (size_t i = 0; i < start_pos.size(); ++i) {
470 m_read_position[i].store(start_pos[i]);
471 }
472}
std::vector< std::atomic< uint64_t > > m_read_position
std::vector< uint64_t > start_coordinates
Starting frame index (inclusive)
Definition Region.hpp:69

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