Playback stops with [E] SDDirect.h : 81 #2227
-
|
Using: I'm aiming to make a media player that is suppose to run almost the whole day. However, I found that after my player does several loops, it would stop and give this message The results are summed as follows: So it seems to be losing memory every time the track changes. How do I free up the memory that was used by previous track? I have attached my code in the .zip file. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
|
Hmm, this will be difficult to find!
I think VS1053Stream is rarely used: so it might come from there ? ps. This assumes that the memory leak is not in the SD library, so this might need to be tested separatly. You can try to replace it with SDFAT. |
Beta Was this translation helpful? Give feedback.
-
|
I found the problem: for the AudioSourceSD, the last file was not closed: I committed a correction to align the logic whith what has been implemnted for SDFAT. If you want to use the callback, you would do something like this: // provide the next "file"
File actual_file;
Stream* nextStreamCallback(int offset) {
actual_file.close();
actual_file = SD.open(your next file name)
return &actual_file;
}
|
Beta Was this translation helpful? Give feedback.

The same with the following player test sketch that just generates 0 values during 5 seconds: