old demo that i want to try in mbed studio
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
Diff: NotchingDemo.cpp
- Revision:
- 37:a563899ac0df
- Parent:
- 36:569ec4335f92
- Child:
- 38:3b4c05af5f36
--- a/NotchingDemo.cpp Mon May 27 19:44:22 2019 +0000
+++ b/NotchingDemo.cpp Mon May 27 21:15:45 2019 +0000
@@ -11,6 +11,7 @@
#include "SDFileSystem.h"
#include "wm8731_Config_setup.h"
#include "WOLFSON_config_consts.h"
+#include <string>
#include <stdlib.h>
#include <fstream>
#include <iostream>
@@ -378,13 +379,50 @@
FILE *IdleWav;
+ char buf[10];
+ int a = 1;
+ sprintf(buf, "%d", a);
+ string foo( "hello" );
+ string test( "how are" );
+ string hello;
+ hello = foo + test;
+ printf("%s\n\r",hello);
+
+ string RootFolder = "sd/mydir/SoundDecoder_second/";
+ string folder = RootFolder + "0" + buf + ".wav";
+ printf("FullFile location: %s\n\r",folder);
+ classSoundFile Sound[22];
+ string file_names[22];
+ for(int aaa = 0; aaa < 20; aaa ++) {
+ a = aaa+1;
+ sprintf(buf, "%d", a);
+ Sound[aaa].file_location = RootFolder + "0" + buf + ".wav";
+ printf("FileName: %s\n\r",Sound[aaa].file_location);
+ }
+
+ /*
+ string RootFolder = "sd/mydir/SoundDecoder_second/";
+ string folder = RootFolder + "01.wav";
+ printf("Full file location: %s\n\r",folder);
+ */
+ /*
+ for(int aaa = 0;aaa < 21; aaa ++ )
+ {
+ folder = RootFolder + "\01.wav";//filename[aaa];
+ FOLDER = folder.c_str();
+ Sound[aaa].FileInfo.WavFile = fopen(FOLDER,"rb");
+ //MyNewWav.WavFile = fopen("/sd/mydir/Startup.wav","rb");
+ printf("we opened This file %d\n\r",aaa);
+
+ }
+ */