|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Kakshya::DynamicSoundStream > MayaFlux::IO::IOManager::load_audio_bounded | ( | const std::string & | filepath, |
| uint64_t | max_frames = 0, |
||
| bool | truncate = false |
||
| ) |
Load an audio file into a fully resident, size-bounded DynamicSoundStream.
Applies the engine sample rate, ROW_MAJOR layout, and the engine buffer size as the CursorAccessProcessor block size. The result is ready for use with StreamSliceProcessor without any further configuration.
| filepath | Path to the audio file. |
| max_frames | Upper bound on frame count. 0 defaults to 5 s at the engine sample rate inside SoundFileReader::load_bounded. |
| truncate | If true, silently truncate files exceeding max_frames. |
Definition at line 278 of file IOManager.cpp.
References MayaFlux::Journal::API, MayaFlux::Journal::FileIO, m_audio_readers, m_sample_rate, MF_ERROR, and MayaFlux::Kakshya::ROW_MAJOR.