playfultechnology / audio-guestbook

The "audio guestbook" is a converted telephone handset that guests can use to leave recorded messages at weddings and parties
GNU General Public License v3.0
141 stars 88 forks source link

update audio-guestbook.ino #150

Open coldkevin opened 1 month ago

coldkevin commented 1 month ago

Increased AudioMemory from 60 to 120 to handle more audio data and avoid potential audio dropouts, ensuring smoother recordings.

Reduced microphone gain (micGain) to 2, down from the previous value, to minimize static and warbling sounds during recording.

Set the volume of the audio shield (volume) to 0.85 to avoid audio clipping during playback.

Increased debounce times for buttonRecord and buttonPlay from 20 ms to 40 ms. This helps ensure more reliable detection of button presses and releases.

Increased the number of audio blocks written to the SD card at once (from 16 to 32). This helps reduce the frequency of writes, making the recording process more efficient and potentially reducing interruptions.

Added a recording timeout of 10 minutes (RECORDING_TIMEOUT). This ensures that if the handset is left off the hook, the recording will automatically stop after 10 minutes, preventing excessive file sizes and SD card usage.

Adjusted the writeOutHeader() function for better handling of WAV file metadata, ensuring that the header data is correctly written after recording completes.

Maintained improvements to handle playback more reliably, allowing playback of the last recorded message and ensuring that playback mode is exited cleanly.