[xiph-commits] r8036 - trunk/postfish

xiphmont at motherfish-iii.xiph.org xiphmont at motherfish-iii.xiph.org
Sat Oct 16 15:38:24 PDT 2004


Author: xiphmont
Date: 2004-10-16 15:38:24 -0700 (Sat, 16 Oct 2004)
New Revision: 8036

Modified:
   trunk/postfish/compandpanel.c
   trunk/postfish/singlepanel.c
   trunk/postfish/version.h
Log:
Oops, the feedback display code in the companders wasn't set up to
deal properly with displaying peak followers.  Fixed.



Modified: trunk/postfish/compandpanel.c
===================================================================
--- trunk/postfish/compandpanel.c	2004-10-16 22:08:24 UTC (rev 8035)
+++ trunk/postfish/compandpanel.c	2004-10-16 22:38:24 UTC (rev 8036)
@@ -1057,7 +1057,7 @@
 static float **rmsfeed=0;
 
 void compandpanel_feedback(int displayit){
-  int i,j,bands;
+  int i,j,k,bands;
   if(!peakfeed){
     peakfeed=malloc(sizeof(*peakfeed)*multicomp_freqs_max);
     rmsfeed=malloc(sizeof(*rmsfeed)*multicomp_freqs_max);
@@ -1079,9 +1079,12 @@
       for(i=0;i<bands;i++){
 	float rms[input_ch];
 	float peak[input_ch];
-	
-	memset(rms,0,sizeof(rms));
-	memset(peak,0,sizeof(peak));
+
+	for(k=0;k<input_ch;k++){
+	  rms[k]=-150;
+	  peak[k]=-150;
+	}
+
 	rms[j]=rmsfeed[i][j];
 	peak[j]=peakfeed[i][j];
 	

Modified: trunk/postfish/singlepanel.c
===================================================================
--- trunk/postfish/singlepanel.c	2004-10-16 22:08:24 UTC (rev 8035)
+++ trunk/postfish/singlepanel.c	2004-10-16 22:38:24 UTC (rev 8036)
@@ -690,7 +690,7 @@
 static float *rmsfeed=0;
 
 void singlepanel_feedback(int displayit){
-  int j;
+  int j,k;
   if(!peakfeed){
     peakfeed=malloc(sizeof(*peakfeed)*max(input_ch,OUTPUT_CHANNELS));
     rmsfeed=malloc(sizeof(*rmsfeed)*max(input_ch,OUTPUT_CHANNELS));
@@ -705,9 +705,12 @@
     for(j=0;j<input_ch;j++){
       float rms[input_ch];
       float peak[input_ch];
+
+      for(k=0;k<input_ch;k++){
+	rms[k]=-150;
+	peak[k]=-150;
+      }
       
-      memset(rms,0,sizeof(rms));
-      memset(peak,0,sizeof(peak));
       rms[j]=rmsfeed[j];
       peak[j]=peakfeed[j];
       

Modified: trunk/postfish/version.h
===================================================================
--- trunk/postfish/version.h	2004-10-16 22:08:24 UTC (rev 8035)
+++ trunk/postfish/version.h	2004-10-16 22:38:24 UTC (rev 8036)
@@ -1,2 +1,2 @@
 #define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Sat Oct 16 18:31:08 EDT 2004] */
+/* DO NOT EDIT: Automated versioning hack [Sat Oct 16 19:01:00 EDT 2004] */



More information about the commits mailing list