NateRickard / Plugin.AudioRecorder

Audio Recorder plugin for Xamarin and Windows
MIT License
164 stars 68 forks source link

Fix wav saving #64

Closed mattiascibien closed 2 years ago

mattiascibien commented 3 years ago

This PR fixes wav saving as the original code overwrites the initial bytes of audio. Also fixes #53 as some platform enforces correctness of wav files when playing them

ghost commented 3 years ago

Tested on a couple Xiaomis and it's working

Haarmees commented 3 years ago

Nice fix! Do you think it would be an idea/possible to write 44 "filler" bytes (size of wavheader) to the filestream in the beginning and overwrite those in the end? This would avoid using a memorystream, which could potentially create a memory problem with longer recordings.

mattiascibien commented 2 years ago

Nice fix! Do you think it would be an idea/possible to write 44 "filler" bytes (size of wavheader) to the filestream in the beginning and overwrite those in the end? This would avoid using a memorystream, which could potentially create a memory problem with longer recordings.