Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
HolgiB
Posts: 6 Joined: Fri Jan 12, 2007 12:19 am
Post
by HolgiB » Wed Jan 24, 2007 9:51 pm
I am working on an audio player application for the PSP, based on SDL.
It would be nice to have something moving in the player GUI. So my idea was to integrate a kind oscilloscope like many player apps have.
I googled a lot but still not found a small example or informations about something like that can be realized.
Anybody here can tell me something about this or where I can find a good example?
Holger
groepaz
Posts: 305 Joined: Thu Sep 01, 2005 7:44 am
Contact:
Post
by groepaz » Wed Jan 24, 2007 11:08 pm
thats pretty trivial, something like that:
for(i=0;i<size;i++)
{
putpixel(i,halfsize+(audiobuffer/somefactor));
}
do that after every swap of the audio buffer and you'll get something like the scope visualisation in xmms/winamp
HolgiB
Posts: 6 Joined: Fri Jan 12, 2007 12:19 am
Post
by HolgiB » Thu Jan 25, 2007 12:23 am
Thank you! I was already looking at Fourier which looked way to complicate for me :-).
This looks really easy. So I will have to experiment with the values a little to get a good result.
Holger
groepaz
Posts: 305 Joined: Thu Sep 01, 2005 7:44 am
Contact:
Post
by groepaz » Thu Jan 25, 2007 8:14 pm
hehe...the fourier transformation you would need to do an "equalizer" type of visualisation. (although if all you want is visualisation you can get away with simpler, not terribly accurate, stuff)