[xiph-commits] r18407 - trunk/spectrum

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Jun 14 13:35:48 PDT 2012


Author: xiphmont
Date: 2012-06-14 13:35:48 -0700 (Thu, 14 Jun 2012)
New Revision: 18407

Modified:
   trunk/spectrum/spec_panel.c
Log:
dBpp calculation was suffering from integer division -> 0; caused autoscale to not leave buffer at top of graph.



Modified: trunk/spectrum/spec_panel.c
===================================================================
--- trunk/spectrum/spec_panel.c	2012-06-14 20:08:09 UTC (rev 18406)
+++ trunk/spectrum/spec_panel.c	2012-06-14 20:35:48 UTC (rev 18407)
@@ -181,7 +181,7 @@
   case LINK_SUMMED:
   case LINK_PHASE:
     {
-      float dBpp = plot_depth/height;
+      float dBpp = (float)plot_depth/height;
       ymax += dBpp*25;
     }
     break;
@@ -486,8 +486,8 @@
   case 5: /*140dB */
     plot_depth=140;
     break;
-  case 6: /*190dB */
-    plot_depth=190;
+  case 6: /*200dB */
+    plot_depth=200;
     break;
   }
   replot(1,1,0);
@@ -899,7 +899,7 @@
 		      G_CALLBACK (scalechange), NULL);
 
     GtkWidget *menu4=gtk_combo_box_new_text();
-    char *entries4[]={"1dB","10dB","20dB","45dB","90dB","140dB","190dB"};
+    char *entries4[]={"1dB","10dB","20dB","45dB","90dB","140dB","200dB"};
     for(i=0;i<7;i++)
       gtk_combo_box_append_text (GTK_COMBO_BOX (menu4), entries4[i]);
 



More information about the commits mailing list