Dimowner / AudioRecorder

Audio Recording Android application
Apache License 2.0
729 stars 171 forks source link

WavRecorder write file loss 44 bytes #49

Closed pyzhangfan closed 1 month ago

pyzhangfan commented 3 years ago

RandomAccessFile write will overwrite the original content,so wav file loss 44 bytes data; I suggest writing 44 bytes of blank data before recording.

and totalAudioLen ,totalDataLen is wrong.(8 bytes smaller) Thank you

kresle commented 1 month ago

This would cause huge trouble for PCM_24 AudioFormat. But the app itself does not support customizing the AudioFormat, anyway. When I was modifying the code to enable customizing audio sources, there was a USB hardware that could only output PCM_24, and I was tortured by this bug for a long time.

Dimowner commented 1 month ago

Fixed in this PR: https://github.com/Dimowner/AudioRecorder/pull/122