|
|
|
You can use MCI functions if you want to record a WAV file. The main MCI function is mciSendString, that sends command strings to the system and execute them. |
The first argument is the command string, lpstrReturnString receives return information (if needed), uReturnLength is the number of characters in lpstrReturnString, and hwndCallback is used for system notifications. Remember that every command string described in this tip must be sent to the system as follows: |
The first thing to do when working with WAV files is open the WAV device with this statement: |
where "RecWavFile" is an alias, that is an arbitrary name that you'll use in the next command strings to refer to a particular MCI memory buffer (and that you later save to disk). Then you can start, pause or resume and stop recording with one of the following statements: |
You can also set the time format in milliseconds: |
and you can record for a number of milliseconds and then terminate: |
When you have completed your recording homework, you must save the WAV file to file, which you do with |
Finally, always remember to close the device with Close command: |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|