diff options
author | ymherklotz <ymherklotz@gmail.com> | 2018-03-05 16:14:35 +0000 |
---|---|---|
committer | ymherklotz <ymherklotz@gmail.com> | 2018-03-05 16:14:35 +0000 |
commit | df2686e4510b8c801dc075a72c3a936e313e6086 (patch) | |
tree | bcb51cf2059ab76bcf6178e43cc0a3da56e4d432 /Project/RTDSP | |
parent | eeb7f196fe924e2215aecc11aac0a4aea71e4aca (diff) | |
download | NoiseSilencer-df2686e4510b8c801dc075a72c3a936e313e6086.tar.gz NoiseSilencer-df2686e4510b8c801dc075a72c3a936e313e6086.zip |
WORKING
Diffstat (limited to 'Project/RTDSP')
-rw-r--r-- | Project/RTDSP/.launches/RTDSP.launch | 4 | ||||
-rw-r--r-- | Project/RTDSP/enhance.c | 9 |
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="<?xml version="1.0" encoding="UTF-8"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/> -<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="<?xml version="1.0" encoding="UTF-8"?> <memoryBlockExpressionList/> "/> <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="<?xml version="1.0" encoding="UTF-8"?> <modules> <module name="C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Fri Jan 19 14:07:28 GMT 2018" time_long="1516370848357"/> <module name="C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Tue Jan 23 11:15:11 GMT 2018" time_long="1516706111426"/> <module name="C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 01 11:44:21 GMT 2018" time_long="1517485461898"/> <module name="C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 15 13:55:55 GMT 2018" time_long="1518702955359"/> <module name="C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 12:18:55 GMT 2018" time_long="1519733935329"/> <module name="C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Thu Mar 01 13:36:20 GMT 2018" time_long="1519911380476"/> <module name="C:\GIT\RTDSP\Project\RTDSP\Debug\RTDSP.out" time="Mon Mar 05 11:30:19 GMT 2018" time_long="1520249419272"/> <module name="C:\github\RTDSP\Project\RTDSP\Debug\RTDSP.out" time="Mon Mar 05 15:49:48 GMT 2018" time_long="1520264988019"/> </modules> "/> +<stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="<?xml version="1.0" encoding="UTF-8"?> <modules> <module name="C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Fri Jan 19 14:07:28 GMT 2018" time_long="1516370848357"/> <module name="C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Tue Jan 23 11:15:11 GMT 2018" time_long="1516706111426"/> <module name="C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 01 11:44:21 GMT 2018" time_long="1517485461898"/> <module name="C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 15 13:55:55 GMT 2018" time_long="1518702955359"/> <module name="C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 12:18:55 GMT 2018" time_long="1519733935329"/> <module name="C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Thu Mar 01 13:36:20 GMT 2018" time_long="1519911380476"/> <module name="C:\GIT\RTDSP\Project\RTDSP\Debug\RTDSP.out" time="Mon Mar 05 11:30:19 GMT 2018" time_long="1520249419272"/> <module name="C:\github\RTDSP\Project\RTDSP\Debug\RTDSP.out" time="Mon Mar 05 16:12:26 GMT 2018" time_long="1520266346318"/> </modules> "/> <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="<?xml version="1.0" encoding="UTF-8"?> <globalVariableList/> "/> 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++; } /************************************************************************************/ |