Unexpected behavior while audio recording.

Assuming that
restartbutton restarts the entire audio recording from the beginning.start/stopbutton starts and pauses the audio recording.playbutton plays the audio recorded till now.
The Bug
The present recorded audio gets concatenated to the previously recorded audio after pressing the restart button.
Steps to reproduce the Bug:
- record audio.
- directly press the
restartbutton. - record the audio again.
- press the
playbutton, you will hear the concatenated recording of both audios.
Expected behavior
Only the recent recorded audio should be played when the play button is pressed.
Additional context
This bug is produced only when you directly press restart and start recording again.
If the audio is played (play) after the first recording and then rerecorded, this bug is not reproduced.
Only the recent audio is played.
Can you assign me this issue. I want to work on it, under GSSOC 21.
Yes, @Starboww go ahead!!
Hello, @Starboww have you made any progress on this issue?

I tried to search this image inside the res directory so the i can modify the method attached to it but i was't able to find it . can you help me with it
The audio record feature currently uses a third party library. You can check it here