old demo that i want to try in mbed studio
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
Revision 72:599068243a0f, committed 2019-09-30
- Comitter:
- roryhand
- Date:
- Mon Sep 30 20:11:15 2019 +0000
- Branch:
- LargeFile_Tests
- Parent:
- 71:1364f7d7bff3
- Child:
- 73:a5ab93214728
- Commit message:
- WIP - believe most of this logic is here? Now need to implement handshaking flag system?
Changed in this revision
| NotchingDemo.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/NotchingDemo.cpp Mon Sep 30 20:00:13 2019 +0000
+++ b/NotchingDemo.cpp Mon Sep 30 20:11:15 2019 +0000
@@ -605,10 +605,17 @@
fseek(wavfile1,Positions.notch_position_indicators[NotchingSet.Notch],SEEK_SET);
fread(slice_buf1, Sound1.FileInfo.FileFormat.block_align,1,wavfile1);
data_sptr1=(short *)slice_buf1;
+ Positions.notch_position_indicators[NotchingSet.Notch] = Positions.notch_position_indicators[NotchingSet.Notch] + 2;
+ //increment up the position indicator!
+
fseek(wavfile1,Positions.notch_position_indicators[NotchingSet.Notch - 1],SEEK_SET);
fread(slice_buf2, Sound1.FileInfo.FileFormat.block_align,1,wavfile1);
data_sptr2=(short *)slice_buf2;
+ Positions.notch_position_indicators[NotchingSet.Notch - 1] = Positions.notch_position_indicators[NotchingSet.Notch - 1] + 2;
+ //increment up the position indicator!
+
+
if(NotchingSet.NotchDirection)
{
@@ -633,12 +640,21 @@
NotchFadeIn.FadeIn();
if(Positions.notch_transitions_position_indicators[NotchingSet.NotchTransUp] >= Positions.notch_transitions_start_pts[NotchingSet.NotchTransUp+1])
{
-
+ *Sound1.data_sptr = *data_sptr3*NotchFadeIn.FadeCoeff;
}
+ else
+ {
+ *Sound1.data_sptr = *data_sptr1*NotchFadeOut.FadeCoeff + data_sptr2 + data_sptr3*NotchFadeIn.FadeCoeff;
+ }
}
+ else
+ {
+ *Sound1.data_sptr = *data_sptr3;
+ //include a flag here, to hand over control. Going to get a bit complicated!!!
+ }