"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Module: modMultimedia
Routines for working with multimedia devices. The module contains miscellaneous multimedia functions dealing with waveform audio files. The routines allow you to play or stop playing Windows .WAV files, to get and set the volume levels for wave devices, and to determine whether your user's machine supports waveform audio.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modMultimedia module
|
|
CanPlayWaveData
|
Procedure
|
Determines if there is a device capable of playing wave files
|
|
dblToLong
|
Procedure
|
This routine does an unsigned conversion from a Double value to a Long value.
This function correctly handles doubles greater than 2,147,483,647 and less than or equal to 4,294,967,295.
|
|
HiWord
|
Procedure
|
Returns the high integer of the passed long
|
|
IntToLong
|
Procedure
|
Convert an Integer value to a Long value, treating the integer as unsigned
This function treats the integer as though it were unsigned. For example, performing the following assignment
lngNumber = -1
assigns -1 to the variable lngNumber. However, This assignment
lngNumber = IntToLong(-1)
assigns 65,535 to lngNumber.
|
|
LongToInt
|
Procedure
|
This routine does an unsigned conversion from a Long value to an integer value
|
|
LoWord
|
Procedure
|
Returns the low integer of the passed long
|
|
MakeLong
|
Procedure
|
Combines two words (integers) into a long. This routine correctly handles negative input Values
|
|
WaveGetCurrentVolume
|
Procedure
|
Returns the volume level (overall, left and right) settings for waveform audio devices.
Note that the values for the Left and Right channel are modified by this procedure. This means that you should examine the values of the passed variables after calling the function. Do not pass a literal or constant as the lngLeft or lngRight arguments, since they will not be modified.
|
|
WavePlaySound
|
Procedure
|
Plays a .wav file
The eFlags argument is one of the enumerated constants exposed in the declarations section of the module. The valid settings are:
mmpfSND_ASYNC = &H1 ' play asynchronously
mmpfSND_LOOP = &H8 ' loop the sound until next sndPlaySound
mmpfSND_MEMORY = &H4 ' lpszSoundName points to a memory file
mmpfSND_NODEFAULT = &H2 ' silence not default, if sound not found
mmpfSND_NOSTOP = &H10 ' don't stop any currently playing sound
mmpfSND_SYNC = &H0 ' play synchronously (default)
|
|
WaveSetCurrentVolume
|
Procedure
|
Sets the left and right stereo volume levels for waveform audio device.
The settings should be set to values between 0 and 65535. To change the balance between the left and right channels, use different values for each. Some audio devices may not be able to select the exact level that you select, so they will default to the closes available value.
|
|
WaveTerminateSound
|
Procedure
|
Terminates a sound immediately.
Use this to stop a waveform audio sound that is playing asynchronously, or in a loop.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|