~grauw/vgmplay-msx#9: 
Discard sample data as it’s loaded into sample memory

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.

Status
REPORTED
Submitter
bitbucket:Laurens Holst
Assigned to
No-one
Submitted
1 year, 6 months ago
Updated
3 months ago
Labels
No labels applied.

bitbucket:Laurens Holst 1 year, 6 months ago

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.

Register here or Log in to comment, or comment via email.