old demo that i want to try in mbed studio
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
Diff: NotchingDemo.cpp
- Revision:
- 35:4469b508dda3
- Parent:
- 34:26118c8f2e48
- Child:
- 36:569ec4335f92
--- a/NotchingDemo.cpp Mon May 27 17:38:32 2019 +0000
+++ b/NotchingDemo.cpp Mon May 27 17:43:08 2019 +0000
@@ -498,6 +498,7 @@
if(N3Wav == NULL) {
printf("Cannot Open N3Wav\n\r");
}
+ fclose(N3Wav);
StartupWav = fopen("/sd/mydir/Startup.wav","rb");
timer_open.reset();
printf("It took %d useconds to open file\n\r",timer_open.read_us());
@@ -663,18 +664,18 @@
{
while(slice<FileInfo.num_slices) {
if(FileSwitchFlag == 1) {
- fread(WavInfo_N3.slice_buf,WavInfo_N3.FileFormat.block_align,1,N3Wav);
- data_sptr=(short*)WavInfo_N3.slice_buf;
+
if(temp == 1) {
printf("Does it go to this point\n\r");
- FILE* testwav = fopen("/sd/mydir/SoundDecoder_second/05.wav","rb");
+ N3Wav = fopen("/sd/mydir/SoundDecoder_second/03.wav","rb");
if(N3Wav == NULL) {
printf("Cannot Open testwav\n\r");
}
fclose(StartupWav);
temp = 0;
}
-
+ fread(WavInfo_N3.slice_buf,WavInfo_N3.FileFormat.block_align,1,N3Wav);
+ data_sptr=(short*)WavInfo_N3.slice_buf;
} else {
fread(FileInfo.slice_buf,FileInfo.FileFormat.block_align,1,my_wav);
data_sptr=(short *)FileInfo.slice_buf; // 16 bit samples