News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Oscilloscope in windows

Started by the_nemesis, May 15, 2005, 10:10:45 PM

Previous topic - Next topic

the_nemesis

I have created a program using MASM32 that plays some music (XM) I was wondering if someone could start me in the right direction for creating an oscilloscope or spectrum analyser.

I guess I would need some calls to the sound card api but don't know where to go from here.

Thanks in advance for any help.

BogdanOntanu

That is not connected with the sound card.
I guess you mean visualization of the music you play and not of the recording/input stream in realtime.

Anyway for an osciloscope just plot the sample's amplitude over time
for spectrum analyser just use some frequency filters or a FFT transform
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

the_nemesis

I actually have a lib a friend wrote that plays XM audio, i don't have any way to check the samples amplitude, thats why i thought i'd have to read it from the sound card, I don't mind of other sounds in the system gets tracked into the wave as well.

Tedd

You need to get at the wave data before it's sent to the sound card - if at all possible.
Reading the data back from the sound card is very slow at best, and not allowed at worst :bdg
If you can get the source code for the lib, then you could have a callback or something that allows you to access the wave data before it's locked and given to the soundcard. (Or convince your friend it's a good idea :wink)
No snowflake in an avalanche feels responsible.