Currently, I am trying to play the playlist in the PresenseArduino tutorial on the following site on the Presense.
https://developer.sony.com/develop/spresense/docs/arduino_tutorials_ja.html
After following the procedure and displaying the list, the first song will be displayed between each song as shown in the image below.The first song always plays in between even when it actually works.
This symptom occurred in version 2.5.0 or later of the Presence Reference Board and was verified to work properly in 2.4.0.How do I get to work properly with version 2.5.0 and later?
sense
After analyzing the difference between SDKv2.4 and SDKv2.5,
The size and contents of the internally auto-generated alias_list_alltrack.bin file are different and
This seems to be the reason why the playlist is not displayed correctly.
Recreate this file on your sketch to avoid this problem.
static void update_alias_file(const char*dirname)
{
char fname [64];
File file;
uint32_t size;
uint32_t*buffer;
uint32_ti;
sprintf(fname, "%s/alias_list_alltrack.bin", dirname);
/* Read alias file into buffer*/
file=File(fname,FILE_READ);
size = file.size();
buffer=(uint32_t*)malloc(size);
file.read(buffer,size);
file.close();
/* Create the correct alias file*/
if(buffer[1]==0x0){
unlink(fname);
file=File(fname,FILE_WRITE);
for(i=0;i<size/4;i+=2){
file.write(uint8_t*)&buffer[i], 4);
}
file.close();
}
free(buffer);
thePlaylist.select(Playlist::ListTypeAllTrack, "");
}
success=thePlaylist.init(playlist_dirname);
if(!success){
printf("ERROR: no exist playlist file%s/TRACK_DB.CSV\n",
playlist_dirname);
while(1);
}
update_alias_file(playlist_dirname); // ★★★ Add
© 2024 OneMinuteCode. All rights reserved.