Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SB Interfacing

Status
Not open for further replies.

UmaGrama

Technical User
Sep 8, 2003
33
BR
Ok... I am working in a project that interfaces with a SB card. I throw a analog signal into the SoundBlaster 16 card and I have to take the data (digitalized) to analyze it for different purposes.

I got it to work using direct access to the SB card (using io.dll). The problem is that I am losing a lot of the data because the frequency that is taken into the card is fairly high and the algorithm is not fast enough to capture it (not saying that with direct access is only 8 bits).

My idea was to use the DMA to save all the data, that way I can save the CPU to work on something else. And I can get a better resolution with a 16 bit mode. My problem with that is that I dont fully understand the buffer segment, offset, page to complete that procedure (any help with that is welcome!).

Anyway, anyone has a better suggestion on how to capture that data with a better efficiency? bNasty said something about using DirectX. It sure sounds very interesting though I am not familiar about DirectX. I will do some researches on it and see what I can find out. Meanwhile any help on this topic is appreciated.

Thanks guys
 
DirectX is a way to go that would probably be just what you need. You could also write a thread that operates separately to the main program thread, but this would also tie up the CPU. How are you currently querying the device? Are you using a simple windows timer to do it(not recommended)? What sampling frequency do you need to operate with? You may be limited by other things.

Good luck,
Chris
 
OK, if you think that DirectX could be 'too tough' thing, you might also try with Windows multimedia functions. Here is the link to an excellent example on how to get input from sound card, do something with it and then send it back to sound-card. (It is VisualC++ app, but has nothing Microsoft-specific)


Hope this helps :)
 
The way I am getting my data right now is sending a output to the DSP telling it to grab the signal in the mic input and save it in a file or in a graph.

Right now I dont have a sampling rate. I created a loop to just keep reading in the data as fast as it can... I am pretty sure that is not right though.

I am so lost that is so freaking sad :/.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top