Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.