Talk:Proposal: Earlier Disk Over-run Warnings
Steve 14Apr16 I'd guess that what we need is 'one' piece of code that tests for disk space, 'one' piece of code that handles the error, then multiple places where the test is called.
The "test" needs to be available and sufficiently flexible to work in all cases. For example, when generating a sound from a built-in effect we know in advance (almost) exactly how much space will be required, but when generating from a Nyquist effect we have no idea until Nyquist returns the data, and when recording we only know the rate at which data is written.
Getting the "test" and "error handling" to work correctly is the major task and imo should be the subject of bug 437.
Additional (smaller) bugs can then be raised for each additional situation where running out of disk space may occur, and fixing these should be relatively easy once the code for testing and error handling is in place. For example, it may be appropriate to enable calling the test periodically from ProgressDialog.