File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ class AudioSourceSDFAT : public AudioSource {
80
80
exension = ext;
81
81
setup_index = setupIndex;
82
82
is_sd_setup = true ;
83
+ // since we expect an open fs we do not close it
84
+ is_close_sd = false ;
83
85
}
84
86
85
87
virtual ~AudioSourceSDFAT () {
@@ -102,8 +104,9 @@ class AudioSourceSDFAT : public AudioSource {
102
104
103
105
void end () {
104
106
if (is_sd_setup) {
107
+ TRACEI ();
105
108
#ifdef ESP32
106
- sd.end ();
109
+ if (is_close_sd) sd.end ();
107
110
#endif
108
111
is_sd_setup = false ;
109
112
}
@@ -177,6 +180,7 @@ class AudioSourceSDFAT : public AudioSource {
177
180
bool setup_index = true ;
178
181
bool owns_cfg = false ;
179
182
bool is_sd_setup = false ;
183
+ bool is_close_sd = true ;
180
184
181
185
const char *getFileName (AudioFile &file) {
182
186
static char name[MAX_FILE_LEN];
You can’t perform that action at this time.
0 commit comments