Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

extracting data from sound card

Status
Not open for further replies.

aredhel

Member level 2
Joined
Feb 22, 2008
Messages
50
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,800
+re: +c++ +capturebuffer -c#

Hello there, I am doing a project titled Heartbeat Monitor. The sensors used to detect the EGG signal were electrode pads. I was planning to cut cost and use the microphone jack as an interface between my circuit and the computer. I read somewhere that the sound card could be used as an ADC and after extracting this data using Visual Basic a program is written in Visual Basic to count the number of heartbeats. My question is how do I convert the analogue data to digital using the sound card and how do I call the digitised signal and then count it? I am only familiar with the basics of C++ and I have yet to learn how to create a GUI with VB. Thank you for any input.
 

interfacing sound card vb

The easiest way is to use DirectX -> DirectSound -> CaptureBuffer.

Basically you create an interface to DirectX, open DirectSound, create the CaptureBuffer, start it and read from it.

You could also look at OpenAL, I think it is a C Library/API that is fairly simple to use.
 

sound card adc read visual basic

In order to do this I first need the audio API right ... Since I am going to use the soundcard as the ADC (feed the ECG mono signal through the microphone jack socket) which API do I need?

I am going to use the ECG signal to calculate the number of heartbeats and display it on a VB made oscilloscope. Does anyone knows the bunch of API that I need? I found some on the internet, but I doubt I need them all. Help please and thank you to those who replied.
 

Hello again,

I have found a software done by someone that meets my requirements where he provided the codes and EXE files that can be downloaded here . More information on his software can be found here.

I am using his codes for reference in building my own software. However when I went through "Functions.bas" I saw the following APIs and multimedia functions:

1. waveOutStart
2. WaveOutStop
3. WaveOutAddBuffer
4. mmioDescendParent
5. mmioReadFormat

I tried looking through Microsoft's MSDN website, but could not find anything on them. The EXE file that the programmer compiled works just fine, so I am wondering what those three APIs and two multimedia functions are for since I could not find anything on the internet. Thank you to those who replied.
 

Have you tried: http://www.portaudio.com/?

Works well and works on Windows, Linux, etc.

If you have access to Nuts & Volts, I did an article that used portaudio a few years back.
 

Ah thank you for the site. Anyway as I want to plot my ECG signal, how do I do that? From the codes the x and y coordinates were calculated. I am rather lost with the codes and how the programmer calculate x and y. Anyone?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top