Solved

WINDOWS 32 API PROGRAMMING(SOUND DETECTION)

Posted on 1997-11-04
6
453 Views
Last Modified: 2013-12-03
I want to write a WINS32 API program to detect a sound input from the sound card(I used SB AWE 32)and output the detection to the printer port/serial port. For the serial port, I already figured out how to output the signal by using Assembly Language. However, I don't know how to link my assembly program to the C   program that I used for write the API program.     1) Please explain in detail of how API program works and give a pseudo code for this API program that use for sound detection.2) Please provide me some ideas how to link Assembly program to C   program.3)Please suggest me where can I get the info about API programming. Give me some titles of the books or authors who are expert in this field.It will be appriciated if you guys can answer me A.S.A.P. Thanks.
0
Comment
Question by:slzmw
  • 3
  • 2
6 Comments
 

Author Comment

by:slzmw
ID: 1408165
Adjusted points to 120
0
 

Author Comment

by:slzmw
ID: 1408166
Points increased to 165! Please help me solve this problem!
0
 
LVL 5

Expert Comment

by:y96andha
ID: 1408167
Is that a Win32 or a Win32S program? I don't think it's a good idea to try to output it using assembly code in a Win32 program, but it might work. It would be better to use API for serial and parallell port too.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:slzmw
ID: 1408168
Points has been increased to 270, please help.( for y96andha )I chose output by using Assembly language because it gave me direct access to the hardware addressesand allowed me to gain fully control of the output I want. Another reason I used Assembly because I am not familiar with win API program. Thanks
0
 
LVL 1

Expert Comment

by:tiago
ID: 1408169
1) use the functions waveInGetNumDevs(), waveInGetID() and waveInGetDevCaps() for detecting the sound devices, then use waveInOpen() to open the device for "recording".
   You must provide a callback procedure (see waveInProc()).

2) put your assembly code INSIDE your C code ( ASM directive)
   The best thing you can do is to use API functions to
   output data to the serial port

3) Win32 SDK Help.
0
 
LVL 1

Accepted Solution

by:
tiago earned 270 total points
ID: 1408170
1) use the functions waveInGetNumDevs(), waveInGetID() and waveInGetDevCaps() for detecting the sound devices, then use waveInOpen() to open the device for "recording".  
You must provide a callback procedure (see waveInProc()).

2) put your assembly code INSIDE your C code ( ASM directive). The best thing you can do is to use API functions to output data to the serial port

3) Win32 SDK Help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now