• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Input from sound Card

I want to read the signal from line-in and then plot it on screen. I have just new to VC++. I will be very greatful if any one could help me. Preferable a routine for reading the input from line-in
Thanx.
0
fmufti
Asked:
fmufti
  • 7
  • 5
1 Solution
 
WxWCommented:
You need the waveIn functions . The structure you should use is :

Open the card with waveInOpen()
Add some buffers that hold the data with waveInPrepareHeader() and waveInAddBuffer()

Record samples with waveInStart()

When recording is finished ( callback or message or event ) , process the buffer and create the datagram you want .

If you have any problems with these functions , ask and I will help you .

If you need to separate the line from other sources ( e.g. microphone , wave etc ) , you need the mixer functions . Ask help ask well.
0
 
fmuftiAuthor Commented:
Can u mail me a working sample for my problem, preferable with AppWizard, so that I can comprehend it. Because this my atarting step to use APIs in my program. I have seen the help for the above functions but glad if you could mail me working sample at :
fmufti@bonbon.net or fmufti@softhome.net. Definately the points will go to you.
Thanx.
0
 
fmuftiAuthor Commented:
Can u mail me a working sample for my problem, preferably with AppWizard, so that I can comprehend it. Because this my starting step to use APIs in my program. I have seen the help for the above functions but glad if you could mail me working sample at :
fmufti@bonbon.net or fmufti@softhome.net. Definately the points will go to you.
Thanx.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
WxWCommented:
Unfortunately I don't know VC++ so I can't make an AppWizzard project . I can mail you however a general demo I made for single API ( not MFC ) , that demonstrates

A.How to open and close the wave device input & output
B.How to record from the wave in
C.How to play from the wave out
D.How to compress a sample using Audio Compression Manager

I mailed that to fmufti@softhome.net
0
 
WxWCommented:
In case you have any difficulties understanding my code, tell me . The application is a single window that has menus to start/stop and record/play .
0
 
fmuftiAuthor Commented:
Thanx, but dont find <mem.h> header file, in VC include directory, tried to use memory.h file but didnt work, what to do..
0
 
WxWCommented:
remove mem.h and change all from "memcpy" to "CopyMemory" and from "memset" to "ZeroMemory"
0
 
fmuftiAuthor Commented:
I'll check, and let u know by tomorrow  if I had problem thanx.
0
 
fmuftiAuthor Commented:
Giving u 50 points rest I'll give u after few days once I check the code as I am busy for few days. Thanx.
0
 
fmuftiAuthor Commented:
Have all the points but if I have any difficulty I'll contact u .
Thanx.
0
 
WxWCommented:
You can reach me at xmic@freemail.gr anytime you want .
0
 
fmuftiAuthor Commented:
Thanx.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now