lincollincol / Amplituda

Audio processing library, which provides waveform data
Apache License 2.0
221 stars 31 forks source link

How to cancel processAudio? #72

Open anonym24 opened 9 months ago

anonym24 commented 9 months ago

The library will continue to process the file until it finishes it though it may not be needed any more or we close the screen where we display it or any other situation. How to stop it?

Especially if audio duration is long (hours)

Also if you have list of audios and you select one for processing but then you want to try another file and select it then there will be a crash because we didn't cancel the previous file processing and library doesn't allow multiple processing at the same time, but anyway it should have the ability to stop the current processing so we could free a slot for a new file otherwise it makes the library quite useless and it's only possible to use it with small duration audio files and wrapping the amplituda.processAudio with Mutex in some singleton repository