Solved

WINDOWS 32 API PROGRAMMING(SOUND DETECTION)

Posted on 1997-11-04
6
448 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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