}// ----------------------------------------- // Quickly add handlers to a process // -- void setupHandlers(IProcessStatus o) { o.onProgress = (p) => PROGRESS = p; // Uses setter o.onComplete = (s) => { if (s) { deleteOldFile(); complete(); } else { fail(msg: o.ERROR); } }; killExtra = () => o.kill(); // In case the task ends abruptly }// --
}// ----------------------------------------- // -- void setupHandlers(IProcessStatus o) { killExtra = () => o.kill(); o.onProgress = (p) => PROGRESS = p; // Note: Uses setter o.onComplete = (s) => { if (s) { deleteOldFile(); if (requirePostSizeFix) { correctPCMSize(); // Note: OGG and MP3 don't restore to the exact byte length } complete(); } else { fail(msg: o.ERROR); } }; }