old demo that i want to try in mbed studio

Dependencies:   mbed SDFileSystem_Copy_of_mbed_version I2S

Branch:
LargeFile_Tests
Revision:
61:212d2db45c56
Parent:
60:36df2997de3d
Child:
63:a8c1971d3d42
--- a/NotchingDemo.cpp	Fri Sep 27 20:12:29 2019 +0000
+++ b/NotchingDemo.cpp	Fri Sep 27 22:06:43 2019 +0000
@@ -102,6 +102,13 @@
     int notch5_indicator, notch6_indicator, notch7_indicator, notch8_indicator;
     int notch1_start_pt, notch2_start_pt, notch3_start_pt, notch4_start_pt;
     int notch5_start_pt, notch6_start_pt, notch7_start_pt, notch8_start_pt;
+     
+    int notch_start_pts [9];
+    int notch_position_indicators[9];
+    int notch_transitions_start_pts[15];
+    int notch_transitions_position_indicators[15];
+    int auxiliary_start_pts[5];
+    int auxiliary_position_indicators[5];
     classPositionIndicators()
     {
         notch1_start_pt = 44;
@@ -111,7 +118,7 @@
         notch5_start_pt = notch4_start_pt + 92010;
         notch6_start_pt = notch5_start_pt + 216642;
         notch7_start_pt = notch6_start_pt + 250316;
-        notch8_start_pt = notch7_start_pt + 165084;
+        notch8_start_pt = notch7_start_pt + 150152;
         notch1_indicator = notch1_start_pt;
         notch2_indicator = notch2_start_pt;
         notch3_indicator = notch3_start_pt;
@@ -120,6 +127,22 @@
         notch6_indicator = notch6_start_pt;
         notch7_indicator = notch7_start_pt;
         notch8_indicator = notch8_start_pt;
+        notch_start_pts[1] = notch1_start_pt;
+        notch_start_pts[2] = notch2_start_pt;
+        notch_start_pts[3] = notch3_start_pt;
+        notch_start_pts[4] = notch4_start_pt;
+        notch_start_pts[5] = notch5_start_pt;
+        notch_start_pts[6] = notch6_start_pt;
+        notch_start_pts[7] = notch7_start_pt;
+        notch_start_pts[8] = notch8_start_pt;
+        notch_position_indicators[1] = notch1_indicator;
+        notch_position_indicators[2] = notch2_indicator;
+        notch_position_indicators[3] = notch3_indicator;
+        notch_position_indicators[4] = notch4_indicator;
+        notch_position_indicators[5] = notch5_indicator;
+        notch_position_indicators[6] = notch6_indicator;
+        notch_position_indicators[7] = notch7_indicator;
+        notch_position_indicators[8] = notch8_indicator;
 
     }
 };
@@ -271,12 +294,12 @@
     sampletick.attach(&isr,1.0/sampling_freq);  //1/16000
     
     classPositionIndicators Positions;
-    slice1 = Positions.notch2_start_pt;
+    slice1 = Positions.notch7_start_pt;
     FILE* wavfile1 = fopen("/sd/mydir/SoundDecoder_second/All_eight_notches.wav","rb");
     //FILE* wavfile1 = fopen("/sd/mydir/SoundDecoder_second/01.wav","rb");
     classSoundFile Sound1;
     Sound1 = ReadFileInfo(Sound1, wavfile1);
-    fseek(wavfile1,Positions.notch2_start_pt,SEEK_SET);
+    fseek(wavfile1,Positions.notch7_start_pt,SEEK_SET);
     printf("about to play wav file\n\r");
     Play_WaveFileLoop(Sound1,wavfile1,Positions);
     printf("finished playing Wav file\n\r");
@@ -386,9 +409,9 @@
 
 
 //Sound1=======================================================================================
-            if( slice1 == (Positions.notch3_start_pt) ) {
-                slice1 = Positions.notch2_start_pt;
-                fseek(wavfile1,Positions.notch2_start_pt,SEEK_SET);
+            if( slice1 == (Positions.notch8_start_pt) ) {
+                slice1 = Positions.notch7_start_pt;
+                fseek(wavfile1,Positions.notch7_start_pt,SEEK_SET);
             }
 
             fread(Sound1.FileInfo.slice_buf,Sound1.FileInfo.FileFormat.block_align,1,wavfile1);