I made the changes you suggested, but got the same result, it stops and exports, but keeps exporting afterwards. And @joan when I added rg = False where you said, it did the same thing as what @thagrol suggested; it stopped recording and exported, but kept exporting over and over again.For declaring the variable as global, wouldn't I just put global rg in every function where it uses it? Eg. close_audio() record_audio() and main()?
Yes. Just like you have with stream and frames in record_audio() and wav_file in main()
That won't solve the discarding exception isse in your functions though.
Statistics: Posted by Henrik Gill — Tue Oct 08, 2024 12:01 am