old demo that i want to try in mbed studio

Dependencies:   mbed SDFileSystem_Copy_of_mbed_version I2S

Files at this revision

API Documentation at this revision

Comitter:
roryhand
Date:
Tue Oct 01 19:07:00 2019 +0000
Branch:
LargeFile_Tests
Parent:
74:e71a7815f63d
Child:
76:9535aedba4da
Commit message:
WIP - ISSUE - appears to take 3000-odd micro seconds to perform freads in this section. CHECK how long it takes in the section that works!

Changed in this revision

NotchingDemo.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NotchingDemo.cpp	Mon Sep 30 22:06:03 2019 +0000
+++ b/NotchingDemo.cpp	Tue Oct 01 19:07:00 2019 +0000
@@ -36,6 +36,7 @@
 Ticker TickFadeOut;
 Timer t;
 Timer t2;
+Timer OperationsTimer;
 Timer NotchTimer;
 Timer timer_open;
 
@@ -627,9 +628,21 @@
       
             //printf("TransitionFlag == 1, so now we are going to do some other processing\n\r");
             //NOTCH 1
+            //OperationsTimer.reset();
+            //OperationsTimer.start();
             fseek(wavfile1,Positions.notch_position_indicators[NotchingSet.Notch],SEEK_SET);
+            //OperationsTimer.stop();
+            //printf("It took %d useconds to perform fseek operation.\n\r",OperationsTimer.read_us());
             //printf("We have seeked through the file\n\r");
+            
+            
+            printf("Size of Sound1.FileInfo.FileFormat.block_align: %d\n\r",Sound1.FileInfo.FileFormat.block_align);
+            
+            OperationsTimer.reset();
+            OperationsTimer.start();
             fread(Sound1.FileInfo.slice_buf, Sound1.FileInfo.FileFormat.block_align,1,wavfile1);
+            OperationsTimer.stop();
+            printf("It took %d useconds to perform fread operation.\n\r",OperationsTimer.read_us());
             //printf("We have now read in 2 bytes of data (i.e. 1 sample)\n\r");
             data_sptr1=(short *)Sound1.FileInfo.slice_buf;
             //printf("We have now cast this data to a short data type\n\r");
@@ -648,7 +661,7 @@
             if(NotchingSet.NotchDirection)
 
             {
-                printf("Reached if(NotchingSet.NotchDirection)\n\r");
+                //printf("Reached if(NotchingSet.NotchDirection)\n\r");
 
                 //N1 N2 Transition
                 fseek(wavfile2,Positions.notch_position_indicators[NotchingSet.NotchTransUp],SEEK_SET);