@user1388

Hi,

This is a known issue. I have found a temporary solution for now. Unfortunately, this requires that you build the Spresense Arduino package again. You can use this: https://github.com/sonydevworld/spresense-arduino-compatible

Currently, when an error is detected, the Audio module stops working. However, this can be changed and when FIFO OVERFLOW is detected, samples can be dropped instead.

As a result, the application does not finish recording, but on the other hand does not guarantee that all samples will be saved.

Solution:

Find function bool AudioRecorderSink::write(const AudioRecSinkData_s &param) in the file sdk/modules/audio/objects/media_recorder/audio_recorder_sink.cpp

Comment line number 84.

Return true instead of false on line number 85.

After the changes, the function should look like this:

bool AudioRecorderSink::write(const AudioRecSinkData_s &param) { if (param.byte_size > 0) { if (CMN_SimpleFifoGetVacantSize(static_cast<CMN_SimpleFifoHandle *> (m_output_device_hdlr.simple_fifo_handler)) < param.byte_size) { // MEDIA_RECORDER_WARN(AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_OVERFLOW); return true; } if (CMN_SimpleFifoOffer(static_cast<CMN_SimpleFifoHandle *> (m_output_device_hdlr.simple_fifo_handler), static_cast<const void*>(param.mh.getVa()), param.byte_size) == 0) { MEDIA_RECORDER_WARN(AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_OVERFLOW); return false; } m_output_device_hdlr.callback_function(param.byte_size); } return true; }

This is only a temporary solution. If I find other, I will let you know.