[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-1/amarok/amarok/vis
From: Max Howell <max.howell () methylblue ! com>
Date: 2004-03-26 4:44:27
Message-ID: 20040326044427.0B28E99C8 () office ! kde ! org
[Download RAW message or body]
CVS commit by mhowell:
* Makefile for xmmswrapper, should work for all, just type make, no configure. I love \
tiny Makefiles :)
* Interestingly, using -O3 rather than -O2 results in a smaller binary by a third. \
Must be all the inlining.
* Prettier sonogram' 'amarok/vis/experimental_api/base.cpp' \
'amarok/vis/experimental_api/sonogram.cpp
A xmmswrapper/Makefile 1.1
M +2 -0 experimental_api/base.cpp 1.4
M +8 -9 experimental_api/sonogram.cpp 1.3
M +0 -7 xmmswrapper/.cvsignore 1.2
M +8 -0 xmmswrapper/xmmswrapper.cpp 1.5
--- kdeextragear-1/amarok/amarok/vis/experimental_api/base.cpp #1.3:1.4
@@ -26,4 +26,6 @@ amaroK::Vis::Base<T>::Base( DataType dt,
, m_right( 512, 0 )
{
+ std::cout << "Sleeping every " << m_sleepTime / 1000 << "ms\n";
+
path = getenv( "HOME" );
path += "/.kde/share/apps/amarok/visualization_socket";
--- kdeextragear-1/amarok/amarok/vis/experimental_api/sonogram.cpp #1.2:1.3
@@ -12,8 +12,6 @@ using namespace amaroK::Vis;
//from http://www.cs.rit.edu/~ncs/color/t_convert.html
-static void HSVtoRGB( int &_r, int &_g, int &_b, int _h, int _s, int _v ) //values \
of 0-255, bar h = 0-360 +static void HSVtoRGB( int &_r, int &_g, int &_b, float h, \
float s, float v ) //values of 0-255, bar h = 0-360 {
- float h = _h, s = (float)_s/255, v = (float)_v/255;
-
float R,G,B;
float *r = &R, *g = &G, *b = &B;
@@ -86,5 +84,5 @@ void
Sonogram::render( SDL_Surface *screen )
{
- static float max = 0, min = 100;
+
std::copy( left().begin(), left().end(), m_data.begin() );
@@ -107,11 +105,12 @@ Sonogram::render( SDL_Surface *screen )
float f = m_data[255 - y];
- if( f > max ) { max = f; std::cout << "max: " << f << std::endl; }
- if( f < min ) { min = f; std::cout << "min: " << f << std::endl; }
+// static float max = 0, min = 100;
+// if( f > max ) { max = f; std::cout << "max: " << f << std::endl; }
+// if( f < min ) { min = f; std::cout << "min: " << f << std::endl; }
if( f < .005 ) { r = g = b = 0; }
- else if( f < .05 ) { HSVtoRGB( r, g, b, 95, 255, int(f * 4000.0) ); }
- else if( f < 1.0 ) { HSVtoRGB( r, g, b, 95 - int(f * 90.0), 255, 255 ); }
- else { r = 255; g = b = 0; }
+ else if( f < .05 ) { HSVtoRGB( r, g, b, 95, 0.6+f*0.2, f*16.0 ); }
+ else if( f < 1.0 ) { HSVtoRGB( r, g, b, 95 - f*90.0, 0.8, 0.8 ); }
+ else { HSVtoRGB( r, g, b, 5, 0.8, 0.9 ); }
drawPixel( screen, x, y, r, g, b );
--- kdeextragear-1/amarok/amarok/vis/xmmswrapper/.cvsignore #1.1:1.2
@@ -1,9 +1,2 @@
-Makefile
-Makefile.in
-Makefile.calls
-Makefile.calls.in
-Makefile.rules
-Makefile.rules.in
-*.moc
amK_xmmswrapper
--- kdeextragear-1/amarok/amarok/vis/xmmswrapper/xmmswrapper.cpp #1.4:1.5
@@ -30,4 +30,12 @@
+
+GtkWidget dummy;
+GtkWidget *equalizerwin = &dummy; //required by msa visplugin
+GtkWidget *playlistwin = &dummy; //required by msa visplugin
+GtkWidget *mainwin = &dummy; //required by msa visplugin
+
+
+
int tryConnect();
void vis_disable_plugin( VisPlugin *vp ) {} //seems to be a required function (see \
loadVis() )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic