DFRobot / DFRobot_DF1201S

Here comes the DFPlayer Pro-a mini simple but powerful MP3 Player! This MP3 player module supports four controlling modes: Arduino, AT command, on-board buttons, and ADKEY. You can directly press the on-board button to play or switch music without using a controller. By using a USB cable, you can easily copy your favorite songs into this module to play them any where you want, or use it as a sound card for your PC or Raspberry Pi after connecting them together.
MIT License
7 stars 5 forks source link

playFileNum() delay #14

Open sbarabe opened 8 months ago

sbarabe commented 8 months ago

Hi,

I'm using a DFPlayer Pro and it's all working fine but there is an anoying delay using the playFileNum(number) function for switching files or start playing file in SINGLE playmode.

I'm using wav files to reduce delay, and it works well when looping a file in SINGLECYCLE, CYCLE or PLAYALL playmodes : files are playing with no delay.

But if I send the playFileNum(number) command, there is about 200-400 ms delay between the actual sound stopped and the start of the specified file. It's like the command is creating a delay...

Is there a way to remove/reduce that delay somehow? It seems code related to me since the files can play with no delay in others playmode when this function is not use to start playing a file.

Thank you!