musescore / musescore/MuseScore

Audio export should not override existing files if cancelled

Open
#17,745 0 comments 0 reactions 1 assignee View on GitHub

@cbjeukendrup is already working on this.

Since May 31, 2023.

feature request P1
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Your idea

Currently, the export target is immediately cleared when exporting to audio. For 80% of the progress bar, no data is actually written to the file (only a buffer is filled).

Instead, pressing cancel should not clear the file until the encoding process has started. The final 20% is encoding and cannot be interrupted, so once writing to the file starts it will run to completion.

Problem to be solved
  • Overriding the wrong export file causes data loss that could be prevented otherwise by cancelling quickly.
  • When the export takes a long time, it can be cancelled and a previous version of the score is still available.
Prior art

It is common in other software to preserve existing files if exporting is cancelled. I think this is often done using temp files, but in this case it would be sufficient to overwrite the file at a later stage during the export process.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.