Mercurial > audlegacy
changeset 2194:b9f60fcdf6cc trunk
[svn] - Improve the scope visualization
author | nhjm449 |
---|---|
date | Fri, 22 Dec 2006 03:06:44 -0800 |
parents | 2522f6053168 |
children | 1c4ac61fd5fa |
files | ChangeLog audacious/visualization.c audacious/widgets/vis.c |
diffstat | 3 files changed, 39 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Dec 22 00:54:43 2006 -0800 +++ b/ChangeLog Fri Dec 22 03:06:44 2006 -0800 @@ -1,3 +1,11 @@ +2006-12-22 08:54:43 +0000 George Averill <nhjm449@gmail.com> + revision [3391] + - Added comment so it won't happen again ;) + + trunk/audacious/mainwin.c | 2 ++ + 1 file changed, 2 insertions(+) + + 2006-12-22 08:52:22 +0000 George Averill <nhjm449@gmail.com> revision [3389] - Allow radiobuttons/checkboxes in the visualization menu to be updated correctly on startup with the addition of the Voiceprint mode.
--- a/audacious/visualization.c Fri Dec 22 00:54:43 2006 -0800 +++ b/audacious/visualization.c Fri Dec 22 03:06:44 2006 -0800 @@ -443,8 +443,10 @@ step = (length << 8) / 74; for (i = 0, pos = 0; i < 75; i++, pos += step) { - intern_vis_data[i] = ((mono_pcm[0][pos >> 8]) >> 11) + 6; - if (intern_vis_data[i] > 12) + intern_vis_data[i] = ((mono_pcm[0][pos >> 8]) >> 12) + 7; + if (intern_vis_data[i] == 255) + intern_vis_data[i] = 0; + else if (intern_vis_data[i] > 12) intern_vis_data[i] = 12; /* Do not see the point of that? (comparison always false) -larne. if (intern_vis_data[i] < 0)
--- a/audacious/widgets/vis.c Fri Dec 22 00:54:43 2006 -0800 +++ b/audacious/widgets/vis.c Fri Dec 22 03:06:44 2006 -0800 @@ -200,13 +200,13 @@ switch (cfg.scope_mode) { case SCOPE_DOT: h = vis->vs_data[x]; - ptr = rgb_data + ((15 - h) * 76) + x; - *ptr = vis_scope_colors[h]; + ptr = rgb_data + ((14 - h) * 76) + x; + *ptr = vis_scope_colors[h + 1]; break; case SCOPE_LINE: if (x != 74) { - h = 15 - vis->vs_data[x]; - h2 = 15 - vis->vs_data[x + 1]; + h = 14 - vis->vs_data[x]; + h2 = 14 - vis->vs_data[x + 1]; if (h > h2) { y = h; h = h2; @@ -214,18 +214,18 @@ } ptr = rgb_data + (h * 76) + x; for (y = h; y <= h2; y++, ptr += 76) - *ptr = vis_scope_colors[y - 3]; + *ptr = vis_scope_colors[y - 2]; } else { - h = 15 - vis->vs_data[x]; + h = 14 - vis->vs_data[x]; ptr = rgb_data + (h * 76) + x; - *ptr = vis_scope_colors[h]; + *ptr = vis_scope_colors[h + 1]; } break; case SCOPE_SOLID: - h = 15 - vis->vs_data[x]; - h2 = 9; + h = 14 - vis->vs_data[x]; + h2 = 8; c = vis_scope_colors[(gint) vis->vs_data[x]]; if (h > h2) { y = h; @@ -357,16 +357,16 @@ switch (cfg.scope_mode) { case SCOPE_DOT: h = vis->vs_data[x]; - ptr = rgb_data + ((15 - h) * 304) + (x << 1); - *ptr = vis_scope_colors[h]; - *(ptr + 1) = vis_scope_colors[h]; - *(ptr + 152) = vis_scope_colors[h]; - *(ptr + 153) = vis_scope_colors[h]; + ptr = rgb_data + ((14 - h) * 304) + (x << 1); + *ptr = vis_scope_colors[h + 1]; + *(ptr + 1) = vis_scope_colors[h + 1]; + *(ptr + 152) = vis_scope_colors[h + 1]; + *(ptr + 153) = vis_scope_colors[h + 1]; break; case SCOPE_LINE: if (x != 74) { - h = 15 - vis->vs_data[x]; - h2 = 15 - vis->vs_data[x + 1]; + h = 14 - vis->vs_data[x]; + h2 = 14 - vis->vs_data[x + 1]; if (h > h2) { y = h; h = h2; @@ -374,24 +374,24 @@ } ptr = rgb_data + (h * 304) + (x << 1); for (y = h; y <= h2; y++, ptr += 304) { - *ptr = vis_scope_colors[y - 3]; - *(ptr + 1) = vis_scope_colors[y - 3]; - *(ptr + 152) = vis_scope_colors[y - 3]; - *(ptr + 153) = vis_scope_colors[y - 3]; + *ptr = vis_scope_colors[y - 2]; + *(ptr + 1) = vis_scope_colors[y - 2]; + *(ptr + 152) = vis_scope_colors[y - 2]; + *(ptr + 153) = vis_scope_colors[y - 2]; } } else { - h = 15 - vis->vs_data[x]; + h = 14 - vis->vs_data[x]; ptr = rgb_data + (h * 304) + (x << 1); - *ptr = vis_scope_colors[h]; - *(ptr + 1) = vis_scope_colors[h]; - *(ptr + 152) = vis_scope_colors[h]; - *(ptr + 153) = vis_scope_colors[h]; + *ptr = vis_scope_colors[h + 1]; + *(ptr + 1) = vis_scope_colors[h + 1]; + *(ptr + 152) = vis_scope_colors[h + 1]; + *(ptr + 153) = vis_scope_colors[h + 1]; } break; case SCOPE_SOLID: - h = 15 - vis->vs_data[x]; - h2 = 9; + h = 14 - vis->vs_data[x]; + h2 = 8; c = vis_scope_colors[(gint) vis->vs_data[x]]; if (h > h2) { y = h;