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

◆ is_at_end()

bool MayaFlux::Kakshya::SoundStreamContainer::is_at_end ( ) const
overridevirtual

Check if read position has reached the end of the stream.

Returns
true if at or past the end of data

Useful for detecting end-of-stream in playback or streaming contexts.

Implements MayaFlux::Kakshya::StreamContainer.

Definition at line 441 of file SoundStreamContainer.cpp.

442{
443 if (m_looping_enabled) {
444 return false;
445 }
446
447 if (m_read_position.empty()) {
448 return true;
449 }
450
451 uint64_t current_frame = m_read_position[0].load();
452 return current_frame >= m_num_frames;
453}
std::vector< std::atomic< uint64_t > > m_read_position

References m_looping_enabled, m_num_frames, and m_read_position.