libvgm icon indicating copy to clipboard operation
libvgm copied to clipboard

Data Loader functions are not intuitive

Open ValleyBell opened this issue 2 years ago • 0 comments

The current workflow for using DataLoader is:

  • File/MemoryLoader Init → create DataLoader object
  • DataLoader SetPreloadBytes → set amount of bytes to load when opening the file
  • DataLoader Load → "open" the file + load data (limited by SetPreloadBytes)
  • [optional] DataLoader Read → load more data
  • DataLoader CancelLoading → "close" the file
  • DataLoader Deinit → destroy DataLoader object

New API that would be easier to understand (and be similar to what is common):

  • File/MemoryLoader Init → create DataLoader object
  • DataLoader Open → "open" the file (don't load data)
  • DataLoader Read → load data
  • DataLoader Close → "close" the file
  • DataLoader Deinit → destroy DataLoader object
  • [remove DataLoader SetPreloadBytes]

ValleyBell avatar Nov 26 '21 11:11 ValleyBell