adafruit / adafruit/Adafruit_VS1053_Library
record_ogg example does not support multiple recordings without reset
- Dominant language
- C++
- Stars
- 152
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
The record_ogg.ino example does not seem to support recording more than one .ogg file without hard-resetting the board in between recordings. The first file (RECORD00.ogg) is recorded fine and plays back in Audacity etc., of subsequent recordings only the first 1024 bytes make it to the SD card.
Steps to reproduce:
- Open record_ogg.ino, change the following to the music maker shield pins:
// define the pins used
#define RESET -1 // VS1053 reset pin (output)
#define CS 7 // VS1053 chip select pin (output)
#define DCS 6 // VS1053 Data/command select pin (output)
#define CARDCS 4 // Card chip select pin
#define DREQ 3 // VS1053 Data request, ideally an Interrupt pin
- Load record_ogg.ino to the Uno
- Press the REC_BUTTON to do multiple recordings
- Inspect recordings on PC
If the Arduino is reset in between recordings, this issue does not occur. The [plugin datasheet](http://www.vlsi.fi/fileadmin/software/VS10XX/VorbisEncoder170c.pdf) states that the plugin does need to be reloaded between recordings (e.g., Sec 2.3.5, point 6), so maybe the only way around it is to do complete board resets between recordings.
Drawback: It takes around 6 seconds to reload the plugin, which delays the start of subsequent recordings from when the button is pressed.
(Music Maker board on Uno, IDE v1.8.9)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the recording flow in record_ogg.ino, especially the REC_BUTTON handling, and compare it with the VS1053 Vorbis encoder plugin datasheet section 2.3.5, point 6. Reproduce multiple recordings on the Music Maker board with an Uno and inspect the files on the SD card. Done means subsequent recordings contain the complete .ogg data without requiring a hard reset or adding the six-second plugin reload unnecessarily.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100