I have got this Voice Recording code from CodeNameOne's official website, here's the code.
({https://pastebin.com/FsLmMK2b})
When I record my voice for the 1st time, everything seems fine and I can hear a playback of it but when I try to record for the 2nd time, I can't hear the playback and an exception generates:
Exception: javax.sound.sampled.LineUnavailableException - line with format PCM_SIGNED 44100.0 Hz, 8 bit, mono, 1 bytes/frame, not supported.
Does anybody know how to fix this?