The information in this article applies to:
SUMMARYAudiolbl.exe is a self-extracting compressed file with a Visual Basic project that displays the input and output volume levels from a sound card. The project uses several Windows API functions. MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: Audiolvl.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. When you run the self-extracting compressed file, the following files are expanded into the Audio Level Sample Project directory of your system:
How the Sample WorksThe sample demonstrates how to display the audio level of an input or output device. The level is stored in a member of a user-defined type variable. The sample uses API functions to manipulate several user-defined type variables in order to extract the audio level.When you first run the project, the mixerOpen function is used to get a handle to the mixer device. The handle is used with the mixerGetLineInfo function to get the capabilities of the mixer device. The capabilities are stored in the MIXERLINE and the MIXERLINECONTROLS user-defined variables. Some of the members of these variables are pointers that you need to manipulate in order to control the mixer. To manipulate these pointers, you need to copy the variables into a buffer using the GlobalAlloc function. After manipulating the variable members, you copy the contents of the buffer back to the variable using the RtlMemory function. The Timer control is used to query these user-defined variables to get the audio level. This level is displayed in the appropriate progress bar. When you click the Get Input button, a user-defined function opens the wave input device using the waveInOpen function. The waveInOpen function requires the WAVEFORMAT user-defined type to configure the recording settings such as the number of channels, the number of sampling bits, and the sampling rate. The wave input device requires a buffer to process the input data. You create this buffer with the waveInPrepareHeader function. The buffer is then sent to the wave input device with the waveInAddBuffer function. With the buffer created, you can start input on the wave device using the waveInStart function. The output level is displayed in a similar fashion. REFERENCES
For more information about the functions used in this sample project,
please see the following topics in the Platform SDK product documentation:
Additional query words: kbDSupport kbdsd kbVBp kbVBp500 kbAPI kbSDKWin32 kbVBp600
Keywords : kbfile kbVBp500 kbVBp600 kbGrpVB kbDSupport |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |