mint-n-pepper / DanceBotsEditor

Qt GUI to edit Dancebot Choreographies
https://www.dancebots.ch
GNU General Public License v3.0
4 stars 1 forks source link

Auto-Save to MP3 in regular intervals. Optional: Delete autosave at program end and ask for loading at program start if file found. #31

Open r-oung opened 4 years ago

r-oung commented 4 years ago

This would be a nice feature in case the GUI or the computer freezes for whatever reason. If I spent 30 minutes making a choreography (which I have) and lost it all, I'd be pretty annoyed.

philippReist commented 4 years ago

Yes, it would be, especially if we cannot figure out the freeze bug. The way I would do it is:

  1. At regular intervals, save a file containing just the header data (beats and primitives) plus file path.
  2. Delete the file on close
  3. On open, check if an autosave file is present. Ask user if they want to restore.
r-oung commented 4 years ago

I was originally thinking that you would just encode and save the mp3 file in the background, but I think yours might be a better idea.

If you use a file, it leaves the possibility in the future to re-use the code and save-file for importing choreographies and scripting language later.

philippReist commented 4 years ago

was originally thinking that you would just encode and save the mp3 file in the background

Actually that would be easy to do as the save operation is already in its own thread. I'll see if this works.

philippReist commented 4 years ago

Not doing this unless crashes are really an issue.