PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
MCIVolume (Function)
In French: MCIVolume
Modifies or returns the sound volume.
Note: If the current computer has no sound card, the function has no effect and it always return 0.
Example
// Modify the sound volume for the "WAV" files
ResVolume = MCIVolume("WAV", 200)
Syntax

Finding out and modifying the sound volume (all files) Hide the details

<Result> = MCIVolume(<Type of Files> , <Element> [, <Volume> [, <Parameters> [, <Name of Message Window>]]])
<Result>: Integer
Corresponds to:
  • the current sound volume.
  • the sound volume before modification.
  • 0 if an error occurred.
<Type of Files>: Character string
Name or alias of the file or device to open.
<Element>: Constant
Element whose sound volume must be modified:
MciRightVolumeRight volume
MciLeftVolumeLeft volume
MciTrebleTreble volume
MciBassBass volume
<Volume>: Optional integer
New sound volume for the specified <Element> (included between 0 and 65535).
<Parameters>: Optional character string (with quotes)
Additional parameters if necessary. These parameters can be known by checking the documentation of the Windows MCI function named "Set".
The MciWait constant can be added to this string. This constant is used to indicate that the program must wait for the end of the MCI command to run the rest of application.
<Name of Message Window>: Optional character string (with or without quotes)
Name of window used to intercept and manage the different messages sent by MMSYSTEM.DLL. These messages are in MM_xxxxxx format and they can be retrieved via Event. You can for example get messages regarding the management of the CD ROM or Joystick.

Finding out and modifying the sound volume (WAV and MID only) Hide the details

<Result> = MCIVolume(<Type of Files> , <New Volume> , <New Volume 2>)
<Result>: Integer
Corresponds to:
  • the current sound volume.
  • the sound volume before modification.
  • 0 if an error occurred.
<Type of Files>: Character string
Type of files:
  • "WAV" for the ".WAV" files.
  • "MID" for the ".MID" files.
  • Name or alias of the file or device to open.
<New Volume>: Integer
New sound volume (included between 0 and 65535). If <New Volume 2> is not specified, corresponds to the general sound volume; otherwise, corresponds to the left sound volume. Only taken into account by the WAV and MID files.
<New Volume 2>: Integer
New sound volume (included between 0 and 65535). Corresponds to the right sound volume. Only taken into account by the WAV and MID files.
Components
WINDEVReports and Queries wd230std.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment