Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
Diff: NotchingDemo.cpp
- Branch:
- LargeFile_Tests
- Revision:
- 72:599068243a0f
- Parent:
- 71:1364f7d7bff3
- Child:
- 73:a5ab93214728
diff -r 1364f7d7bff3 -r 599068243a0f NotchingDemo.cpp
--- 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!!!
+ }