changeset 2181:65ca93cd72bf trunk

[svn] - Added vis gradient to Ivory skin. With any luck Aerdan won't break my legs :) - Made voiceprint subsampling work and fixed pause scrolling bug
author marvin
date Tue, 19 Dec 2006 17:22:33 -0800
parents 10b34c6f1267
children 39358599a5d1
files ChangeLog audacious/visualization.c audacious/widgets/vis.c skins/Ivory/viscolor.txt
diffstat 4 files changed, 44 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 19 16:28:41 2006 -0800
+++ b/ChangeLog	Tue Dec 19 17:22:33 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-20 00:28:41 +0000  Troels Bang Jensen <marvin@fnuck.dk>
+  revision [3365]
+  - Changed the visualizer colors for the Default skin to a gradient
+  
+  trunk/skins/Default/viscolor.txt |   44 +++++++++++++++++++--------------------
+  1 file changed, 22 insertions(+), 22 deletions(-)
+
+
 2006-12-19 23:13:17 +0000  Troels Bang Jensen <marvin@fnuck.dk>
   revision [3363]
   Keep the voiceprint inside the range for the theme.
--- a/audacious/visualization.c	Tue Dec 19 16:28:41 2006 -0800
+++ b/audacious/visualization.c	Tue Dec 19 17:22:33 2006 -0800
@@ -414,10 +414,10 @@
 	else{ /*Voiceprint*/
 	  if (!mono_freq_calced)
 	    calc_mono_freq(mono_freq, pcm_data, nch);
-	  
+	  memset(intern_vis_data, 0, 256);
 	  /* Subsampling; 8 frequencies per sample*/
 	  for(i = 0; i < 256 ; i++)
-	    intern_vis_data[i] = (mono_freq[0][i] >> 8);
+	    intern_vis_data[i>>2] += (mono_freq[0][i] >> 8);
 	  /* Nonlinear transfer function makes the tones stand out*/
 	  //for(i = 0; i < 16 ; i++)
 	  // intern_vis_data[i] = pow(1.2, intern_vis_data[i]);
--- a/audacious/widgets/vis.c	Tue Dec 19 16:28:41 2006 -0800
+++ b/audacious/widgets/vis.c	Tue Dec 19 17:22:33 2006 -0800
@@ -186,19 +186,14 @@
             }
         }
 	else if (cfg.vis_type == VIS_VOICEPRINT) {
-	  for (y = 0; y < 16; y ++) {
-
-            for (x = 74; x > 0; x--)
-	      {
+	  if(!bmp_playback_get_paused()){/*Don't scroll when it's paused*/
+	    for (y = 0; y < 16; y ++) 
+	      for (x = 74; x > 0; x--)
 		vs_data_ext[x + (y * 76)] = vs_data_ext[x-1+(y*76)];
-	      }
-	      } 
-	  for(y=0;y<16;y++){
-	    vs_data_ext[y * 76] = vis->vs_data[y];
+	    for(y=0;y<16;y++)
+	      vs_data_ext[y * 76] = vis->vs_data[y];
 	  }
-	  
 	  memcpy(rgb_data, vs_data_ext,1216);
-	  
 	}
         else if (cfg.vis_type == VIS_SCOPE) {
             for (x = 0; x < 75; x++) {
@@ -338,22 +333,24 @@
             }
         }
 	else if (cfg.vis_type == VIS_VOICEPRINT) {
+	  if(!bmp_playback_get_paused()){/*Don't scroll when it's paused*/
+	    for (y = 0; y < 15; y ++) 
+	      for (x = 74; x > 0; x--)
+		vs_data_ext[x + y * 76] = vs_data_ext[x - 1 + y * 76];
+	    for(y=0;y<16;y++)
+	      vs_data_ext[y * 76] = vis->vs_data[y];
+	  }
 	  for (y = 0; y < 15; y ++) {
             for (x = 74; x > 0; x--)
 	      {
 		ptr = rgb_data + (x << 1) + y * 304;
-		vs_data_ext[x + y * 76] = vs_data_ext[x - 1 + y * 76];
 		*ptr = vs_data_ext[x - 1 + y * 76];
 		*(ptr+1) = vs_data_ext[x - 1 + y * 76];
-
 		//FIXME. Currently only every other line is shown in
 		//doublesize mode.
-		//*(ptr+304) = vs_data_ext[x + y * 76];
+		//*(ptr-304) = vs_data_ext[x + y * 76];
 		//*(ptr+1+304) = vs_data_ext[x - 1 + y * 76];
 	      }
-	  } 
-	  for(y=0;y<16;y++){
-	    vs_data_ext[y * 76] = vis->vs_data[y];
 	  }
 	}
         else if (cfg.vis_type == VIS_SCOPE) {
--- a/skins/Ivory/viscolor.txt	Tue Dec 19 16:28:41 2006 -0800
+++ b/skins/Ivory/viscolor.txt	Tue Dec 19 17:22:33 2006 -0800
@@ -1,24 +1,25 @@
 255,255,255	// [background color 1]
 255,255,255	// [background color 2]
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
-85,127,206
+255,255,255
+240,242,244
+226,230,234
+212,218,223
+198,205,213
+184,193,203
+170,181,192
+156,168,182
+142,156,172
+128,144,161
+114,131,151
+100,119,140
+86,107,130
+72,94,120
+58,82,109
+44,70,99
+30,58,89
 129,129,129		// [osc 1]
-129,129,129		// [osc 2]
-129,129,129		// [osc 3]
-129,129,129		// [osc 4]
-129,129,129		// [osc 5]
+150,150,150		// [osc 2]
+170,170,170		// [osc 3]
+200,200,200		// [osc 4]
+240,240,240		// [osc 5]
 125,125,124		// [peak color]