haumacher / mjSIP

mjSIP - a complete Java-based SIP stack implementation
https://github.com/haumacher/mjSIP
GNU General Public License v2.0
10 stars 8 forks source link

Temporary file for *.wav files never gets deleted #15

Closed veN1337 closed 3 months ago

veN1337 commented 3 months ago

The temporary *.tmp file created by the AudioFile class, when saving*.wavfiles, never gets deleted. Even toughtmp.delete()` is called. You also can not remove it manually because the java process is still holding a reference.

This is because the input stream, which is used to copy the *.tmp file to the actual *.wav file is never closed.

It is fixed by closing the AudioInputStream after AudioSystem.write(...) has written the *.wav file (see here).

haumacher commented 3 months ago

Thanks for your contribution!