I'm building a data acquisition system that's bringing in a non-periodic analog signal. my customer wants the option of "listening" to the signal in addition to displaying it as a graph. i need to output the incoming waveform so that it drives an audio speaker. I'm assuming it would go through a soundcard, as opposed to a system speaker.
the waveform is captured as a 1D array (100 samples) sampled every 100msecs. I can change the sampling freqency if need be.
I haven't tried your code, but it looks like it will work.
Main Topics
Browse All Topics





by: mac-willPosted on 2009-09-14 at 18:06:33ID: 25330625
What do you mean write to a sound card?
Here are some classes and structs I once used to wrap winmm.dll.
There is a method to load and play a memorystream. it is quite easy to make a memory stream from a byte array.
Say you wanted to 'play' a sine wave. You just create a sine wave in short array and modify the Winmm player to take a buffer instead of a 'Wavefile'
Select allOpen in new window