comparison audacious/widgets/vis.c @ 2188:9d06e177eeb1 trunk

[svn] - Fixed voiceprint scroll bug for stopped playback - Made doublesize voiceprint look like it should
author marvin
date Wed, 20 Dec 2006 13:05:57 -0800
parents 65ca93cd72bf
children b9f60fcdf6cc
comparison
equal deleted inserted replaced
2187:3a5a895ce665 2188:9d06e177eeb1
184 rgb_data[(16 - h) * 76 + x] = 23; 184 rgb_data[(16 - h) * 76 + x] = 23;
185 } 185 }
186 } 186 }
187 } 187 }
188 else if (cfg.vis_type == VIS_VOICEPRINT) { 188 else if (cfg.vis_type == VIS_VOICEPRINT) {
189 if(!bmp_playback_get_paused()){/*Don't scroll when it's paused*/ 189 if(!bmp_playback_get_paused() && bmp_playback_get_playing()){/*Don't scroll when it's paused or stopped*/
190 for (y = 0; y < 16; y ++) 190 for (y = 0; y < 16; y ++)
191 for (x = 74; x > 0; x--) 191 for (x = 74; x > 0; x--)
192 vs_data_ext[x + (y * 76)] = vs_data_ext[x-1+(y*76)]; 192 vs_data_ext[x + (y * 76)] = vs_data_ext[x-1+(y*76)];
193 for(y=0;y<16;y++) 193 for(y=0;y<16;y++)
194 vs_data_ext[y * 76] = vis->vs_data[y]; 194 vs_data_ext[y * 76] = vis->vs_data[y];
331 } 331 }
332 } 332 }
333 } 333 }
334 } 334 }
335 else if (cfg.vis_type == VIS_VOICEPRINT) { 335 else if (cfg.vis_type == VIS_VOICEPRINT) {
336 if(!bmp_playback_get_paused()){/*Don't scroll when it's paused*/ 336 if(!bmp_playback_get_paused() && bmp_playback_get_playing()){/*Don't scroll when it's paused or stopped*/
337 for (y = 0; y < 15; y ++) 337 for (y = 0; y < 16; y ++)
338 for (x = 74; x > 0; x--) 338 for (x = 74; x > 0; x--)
339 vs_data_ext[x + y * 76] = vs_data_ext[x - 1 + y * 76]; 339 vs_data_ext[x + y * 76] = vs_data_ext[x - 1 + y * 76];
340 for(y=0;y<16;y++) 340 for(y=0;y<16;y++)
341 vs_data_ext[y * 76] = vis->vs_data[y]; 341 vs_data_ext[y * 76] = vis->vs_data[y];
342 } 342 }
343 for (y = 0; y < 15; y ++) { 343 for (y = 0; y < 16; y ++) {
344 for (x = 74; x > 0; x--) 344 for (x = 74; x > 0; x--)
345 { 345 {
346 ptr = rgb_data + (x << 1) + y * 304; 346 ptr = rgb_data + (x << 1) + y * 304;
347 *ptr = vs_data_ext[x - 1 + y * 76]; 347 /*draw a 2x2 area with the same data*/
348 *(ptr+1) = vs_data_ext[x - 1 + y * 76]; 348 *ptr = vs_data_ext[x + y * 76];
349 //FIXME. Currently only every other line is shown in 349 *(ptr + 1) = vs_data_ext[x + y * 76];
350 //doublesize mode. 350 *(ptr + 152) = vs_data_ext[x + y * 76];
351 //*(ptr-304) = vs_data_ext[x + y * 76]; 351 *(ptr + 153) = vs_data_ext[x + y * 76];
352 //*(ptr+1+304) = vs_data_ext[x - 1 + y * 76];
353 } 352 }
354 } 353 }
355 } 354 }
356 else if (cfg.vis_type == VIS_SCOPE) { 355 else if (cfg.vis_type == VIS_SCOPE) {
357 for (x = 0; x < 75; x++) { 356 for (x = 0; x < 75; x++) {