Skip to content

Commit 17715d6

Browse files
committed
No need to open for reading plus more (only read suffices).
1 parent dad521a commit 17715d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/Beginner/Audio_Playback/Audio_Playback.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <USBHostMbed5.h>
1010
#include <FATFileSystem.h>
1111

12-
// AdvancedDAC library is included inside wav_seeker library
1312
#include "wav_seeker.h"
13+
1414
AdvancedDAC dac1(A12);
1515

1616
USBHostMSD msd;
@@ -41,7 +41,7 @@ void setup()
4141
Serial.println("Opening audio file ...");
4242

4343
// 16-bit PCM Mono 16kHz realigned noise reduction
44-
FILE * f = fopen("/USB_DRIVE/AUDIO_SAMPLE.wav", "r+");
44+
FILE * f = fopen("/USB_DRIVE/AUDIO_SAMPLE.wav", "r");
4545
if (f == nullptr)
4646
{
4747
Serial.print("Error opening audio file: ");

0 commit comments

Comments
 (0)