MayaFlux 1.0.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 427 of file SoundStreamContainer.cpp.

428{
429 if (m_looping_enabled) {
430 return false;
431 }
432
433 if (m_read_position.empty()) {
434 return true;
435 }
436
437 uint64_t current_frame = m_read_position[0].load();
438 return current_frame >= m_num_frames;
439}
std::vector< std::atomic< uint64_t > > m_read_position

References m_looping_enabled, m_num_frames, and m_read_position.