Discard sample data as it’s loaded into sample memory

Create issue
Issue #9 new
Laurens Holst repo owner created an issue

Currently we keep the entire song in memory, including the sample data blocks even though once they’re uploaded to sample memory they’re never needed again.

If we would only keep the actual song data in memory and discard the sample data as it’s being loaded, we could reduce the memory requirement of VGMPlay for tracks with sample data.

Comments (1)

  1. Laurens Holst reporter

    This would mean that VGMPlay needs to move to a pipelined processing method, rather than loading the entire file into memory before processing it. For plain VGM files this is relatively simple, for compressed VGZ files this is more complex and would involve something like coroutines.

    Since the sample data blocks are embedded in the command stream, any commands prior to the data blocks (which can unfortunately occur, e.g. on OPNA) need to be kept, and if the loop point is set prior to the data block this needs to be adjusted as well.

  2. Log in to comment