-
Thanks very much for this library - it's the most reliable one for me so far. Except getFolderTrackCount only returns the number of` files in the 1st folder:
16:16:19.099 -> Total Folder # : 5 Any idea? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Put the following in your sketch before you include the library and rerun your test again. The debug output should include low level packet dumps which will give me more information.
What are the names of your folders? Some devices require the name to start with two digit folder number that is zero padded (it can end with anything) and some will just return the nth enumerated folder.
|
Beta Was this translation helpful? Give feedback.
-
Hi - thanks for following up. I put our define in the 1st line of my .ino but am not seeing more output (in the Serial Monitor). Do I need to do other stuff? (sorry if it's obvious, while being a seasoned programmer I am quite new to Arduino). My folders are simply named 01, 02, 03, ... 0n. The files are named 001_<xxx...>, 002_<xxx...>, 003_<xxx...>, .... 00n_<xxx...> in each folder. Folder 01 contains 3 files, 02 1 file, 03 18 files and 04 and 05 each 1 file, so the total is correct. Thank you.
|
Beta Was this translation helpful? Give feedback.
-
If you look at this entry in the Wiki, you can see what you should be seeing in the output. I gave you the wrong value for the define, follow the wiki entry above. |
Beta Was this translation helpful? Give feedback.
-
This is a known bug of the GD3200B chip. We use the following workaround:
|
Beta Was this translation helpful? Give feedback.
-
This is my first post, and I may be way off base here, so feel free to tell
me to go be quiet and sit in the corner. ;-)
If the purpose of the code snippet you provided is to determine the track
count, then it looks like if you are *not* using the GD3200B chip, the
audio file will start playing at regular volume.
Is this what you really meant?
#ifdef DFMiniMp3_T_CHIP_GD3200B
uint8_t volume = mp3.getVolume()
mp3.setVolume(0);
delay(100);
mp3.playFolderTrack(folder, 1);
delay(500);
#endif
trackCount = mp3.getFolderTrackCount(folder);
#ifdef DFMiniMp3_T_CHIP_GD3200B
mp3.setVolume(volume);
#endif
Also, does the file automatically stop playing when the
getFolderTrackCount() call is made?
Again, please take these comments/observations with a grain of salt as I
may be way off base here.
Cheers.
…-Jon
On Thu, Oct 12, 2023 at 3:14 AM boerge1 ***@***.***> wrote:
This is a known bug of the GD3200B chip. getFolderTrackCount() ignores
the parameter folder and gives the track count of the folder last played
from (on start is uses the first folder in the root directory).
We use the following workaround:
#ifdef DFMiniMp3_T_CHIP_GD3200B
uint8_t volume = mp3.getVolume()
mp3.setVolume(0);
delay(100);
#endif
mp3.playFolderTrack(folder, 1);
delay(500);
trackCount = mp3.getFolderTrackCount(folder);
#ifdef DFMiniMp3_T_CHIP_GD3200B
mp3.setVolume(volume);
#endif
—
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AISY4CPWNVVEQ6FDMA6OKL3X66RHNANCNFSM6AAAAAA54CVZJU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ok, great. Thanks very much for the info. I have it working with the following code. It doesn't require delays and I am calling stop() so not to take chances.
@Makuna here is also the output you requested.
|
Beta Was this translation helpful? Give feedback.
This is a known bug of the GD3200B chip.
getFolderTrackCount()
ignores the parameter folder and gives the track count of the folder last played from (on start is uses the first folder in the root directory).We use the following workaround: