Description
IIUC load
and save
are generally one-off operations, i.e. load("somefile.wav")
loads the full wave file into memory.
Sometimes though, you have huge files that you might not want to load into memory all at once. In my LibSndFile
package I also export loadstream
and savestream
functions that instead return special stream types that you can read/write chunks of audio from.
@jongwook's MP3 package also has the same functionality, but it's not clear who should own those functions. It seems like it would make sense to have them in FileIO
as they use all the same query tooling. In fact, we implement load
and save
as wrappers around the streaming versions.
Do these functions seem like they could fit into the FileIO architecture? What are the video packages currently doing for this sort of thing?