PDA

View Full Version : Code Music PHP cool



nttunghp
02-14-2006, 01:58 PM
Hello every one !
I need some music code, Can you help me ?
Thanks a lot.

Twey
02-14-2006, 02:13 PM
Of course. Have a LAME function.

void analyze_stereo ( const stereo* p, size_t len, korr_t* k )
{
long double _x = 0, _x2 = 0, _y = 0, _y2 = 0, _xy = 0;
double t1;
double t2;

k -> n += len;

for ( ; len--; p++ ) {
_x += (t1 = (*p)[0]); _x2 += t1 * t1;
_y += (t2 = (*p)[1]); _y2 += t2 * t2;
_xy += t1 * t2;
}

k -> x += _x ;
k -> x2 += _x2;
k -> y += _y ;
k -> y2 += _y2;
k -> xy += _xy;
}

nttunghp
02-14-2006, 03:00 PM
Yeah, Thank Twey very much.
But i need full music code, i want create a website on my own by PHP. It is used to listen music and watch movies online. IT's like this :
http://thpt-nguyentrai.net/kth8x/bupbego.org/
Can you help me?

Twey
02-14-2006, 04:57 PM
Yeah, Thank Twey very much.
Yeah, sorry. Every so often I get an urge to strike back at people who ask vague questions. Guess that's why I'm not a PR man. :p
Anyway... John wrote a script to deal with music in an efficient and compatible way. It's here on the forums somewhere, but I can't seem to find it. Have a look yourself, and maybe John will direct us to it if you fail too.