954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to handle buffer

Im trying to do a screen-flashing application that flashes the screen depending on the audio(like an audio visualizer, but instead of a visualization like bars or something like that, just flash the screen).

I already made the music player and know how to make the widget get full screen and change color(which will flash), but I dont know how to detect the (I think it's audio-card)buffer is full, because when it is full I would change the color of the widget, and this would be really super fast, so the screen flashes super quickly. Any ideas on how to detect if the buffer is full, or any other approach I might pursue to achieve my goal?

Thanks beforehand.

Sismetic
Newbie Poster
6 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

Not geting at what you want to do here, but generally visulisers are based on the audio waveform not the sound card buffer. I think what might be a better exercise would be to try to write a bit of code to flash the screen when you detect the bass drum or something like that?

If you really want to use the soundcard buffer then you need very very low level access to the sound card to access its internal registers to check buffering flags. I dont know eactly how one would go about that but maybe some of the api's like directSound, openAL, or similar will let you access those registers.

Kanoisa
Posting Whiz in Training
224 posts since Jul 2008
Reputation Points: 62
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: