MayaFlux 0.2.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 457 of file SoundStreamContainer.cpp.

458{
459 std::vector<uint64_t> start_pos;
460
463 } else {
464 start_pos = std::vector<uint64_t>(m_num_channels, 0);
465 }
466
467 if (m_read_position.size() != start_pos.size()) {
468 m_read_position = std::vector<std::atomic<uint64_t>>(start_pos.size());
469 }
470
471 for (size_t i = 0; i < start_pos.size(); ++i) {
472 m_read_position[i].store(start_pos[i]);
473 }
474}
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.