aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorymherklotz <ymherklotz@gmail.com>2018-03-05 16:14:35 +0000
committerymherklotz <ymherklotz@gmail.com>2018-03-05 16:14:35 +0000
commitdf2686e4510b8c801dc075a72c3a936e313e6086 (patch)
treebcb51cf2059ab76bcf6178e43cc0a3da56e4d432
parenteeb7f196fe924e2215aecc11aac0a4aea71e4aca (diff)
downloadNoiseSilencer-df2686e4510b8c801dc075a72c3a936e313e6086.tar.gz
NoiseSilencer-df2686e4510b8c801dc075a72c3a936e313e6086.zip
WORKING
-rw-r--r--Project/RTDSP/.launches/RTDSP.launch4
-rw-r--r--Project/RTDSP/enhance.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/Project/RTDSP/.launches/RTDSP.launch b/Project/RTDSP/.launches/RTDSP.launch
index 5aa4ead..aa617ce 100644
--- a/Project/RTDSP/.launches/RTDSP.launch
+++ b/Project/RTDSP/.launches/RTDSP.launch
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="com.ti.ccstudio.debug.core.CCELaunchType">
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
-<booleanAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_S_ONLY" value="false"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<booleanAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_S_ONLY" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="com.ti.ccstudio.debug.core.CCEDebugger"/>
<stringAttribute key="CCEDebugOptions.CPU_RESOLVE_OPTION" value="exact"/>
<stringAttribute key="org.eclipse.debug.ui.DISPLAY_NAME" value="RTDSP [Debug] - Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator_0/TMS320C671X"/>
@@ -13,7 +13,7 @@
<stringAttribute key="CCEDebugOptions.TARGET_CONFIGURATION_OPTION" value="full"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_NAME" value="C:\github\RTDSP\Project\RTDSP\Debug\RTDSP.out"/>
-<stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;modules&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out&quot; time=&quot;Fri Jan 19 14:07:28 GMT 2018&quot; time_long=&quot;1516370848357&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out&quot; time=&quot;Tue Jan 23 11:15:11 GMT 2018&quot; time_long=&quot;1516706111426&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Feb 01 11:44:21 GMT 2018&quot; time_long=&quot;1517485461898&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Feb 15 13:55:55 GMT 2018&quot; time_long=&quot;1518702955359&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out&quot; time=&quot;Tue Feb 27 12:18:55 GMT 2018&quot; time_long=&quot;1519733935329&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Mar 01 13:36:20 GMT 2018&quot; time_long=&quot;1519911380476&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\Project\RTDSP\Debug\RTDSP.out&quot; time=&quot;Mon Mar 05 11:30:19 GMT 2018&quot; time_long=&quot;1520249419272&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\Project\RTDSP\Debug\RTDSP.out&quot; time=&quot;Mon Mar 05 15:49:48 GMT 2018&quot; time_long=&quot;1520264988019&quot;/&gt;&#13;&#10;&lt;/modules&gt;&#13;&#10;"/>
+<stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;modules&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out&quot; time=&quot;Fri Jan 19 14:07:28 GMT 2018&quot; time_long=&quot;1516370848357&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out&quot; time=&quot;Tue Jan 23 11:15:11 GMT 2018&quot; time_long=&quot;1516706111426&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Feb 01 11:44:21 GMT 2018&quot; time_long=&quot;1517485461898&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Feb 15 13:55:55 GMT 2018&quot; time_long=&quot;1518702955359&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out&quot; time=&quot;Tue Feb 27 12:18:55 GMT 2018&quot; time_long=&quot;1519733935329&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out&quot; time=&quot;Thu Mar 01 13:36:20 GMT 2018&quot; time_long=&quot;1519911380476&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\GIT\RTDSP\Project\RTDSP\Debug\RTDSP.out&quot; time=&quot;Mon Mar 05 11:30:19 GMT 2018&quot; time_long=&quot;1520249419272&quot;/&gt;&#13;&#10;&lt;module name=&quot;C:\github\RTDSP\Project\RTDSP\Debug\RTDSP.out&quot; time=&quot;Mon Mar 05 16:12:26 GMT 2018&quot; time_long=&quot;1520266346318&quot;/&gt;&#13;&#10;&lt;/modules&gt;&#13;&#10;"/>
<stringAttribute key="CCEDebugOptions.CPU_NAME" value="Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator_0/TMS320C671X"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTDSP"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
diff --git a/Project/RTDSP/enhance.c b/Project/RTDSP/enhance.c
index 9829c00..fc058fe 100644
--- a/Project/RTDSP/enhance.c
+++ b/Project/RTDSP/enhance.c
@@ -50,7 +50,7 @@
#define FRAMEINC (FFTLEN/OVERSAMP) /* Frame increment */
#define CIRCBUF (FFTLEN+FRAMEINC) /* length of I/O buffers */
#define FRAME_TIME 2.5
-#define MAX_COUNT 1000
+#define MAX_COUNT 20000
#define MAX_FLOAT 3.4E+38
#define OUTGAIN 16000.0 /* Output gain for DAC */
#define INGAIN (1.0/16000.0) /* Input gain for ADC */
@@ -247,11 +247,10 @@ void process_frame(void)
if(frame_ctr > MAX_COUNT-1) {
int i;
frame_ctr = 0;
- free(M[NUM_M-1].spec);
- for(k = NUM_M-1; k > 0; ++k) {
+ M[0].spec = M[NUM_M-1].spec;
+ for(k = NUM_M-1; k > 0; --k) {
M[k] = M[k-1];
}
- M[0].spec = (complex *) malloc(FFTLEN * sizeof(complex));
M[0].mag_avg = MAX_FLOAT;
for(i = 0; i < FFTLEN; ++i) {
M[0].spec[i].r = MAX_FLOAT;
@@ -287,7 +286,6 @@ void ISR_AIC(void)
{
short sample;
/* Read and write the ADC and DAC using inbuffer and outbuffer */
- frame_ctr++;
sample = mono_read_16Bit();
inbuffer[io_ptr] = ((float)sample)*ingain;
/* write new output data */
@@ -296,6 +294,7 @@ void ISR_AIC(void)
/* update io_ptr and check for buffer wraparound */
if (++io_ptr >= CIRCBUF) io_ptr=0;
+ frame_ctr++;
}
/************************************************************************************/