fix(radio): close file handle if sound file cannot be played (#5159)

This commit is contained in:
philmoz
2024-06-12 09:11:20 +10:00
committed by GitHub
parent 61a52b8c38
commit 993f2713d4
+1
View File
@@ -551,6 +551,7 @@ int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade)
}
if (result != FR_OK) {
f_close(&state.file);
clear();
}
return 0;