DLL and U32 libraries that control the volume
An accessory for programmers to control the volume in MS
Windows.
© 1992-2005 MultiMedia SoftWare and Studio
DMM, all rights reserved
Description
The volume is controlled by a DLL or U32. The libraries
work in all the MS Windows versions (95, 98, ME, NT, 2000 and XP).
Libraries are compatible
with
Authorware 3, 3.5, 4, 5, 6, 6.5
Delphi 2, 3, 4, 5, 6, 7
Toolbook 6,
6.5, 7, 7.1, 7.2, 8, 8.5 ...
Visual Basic, C Language
and others
.NET Framework
Possibile utilization
Since the control of MIXER in MS Windows is not
implemented in most of the programming languages and author tools, we have
decided to develop our own controller. You can judge for yourself how successful
we were. The Volume Control is driven by the DLL, U32, or XTRAS. The library
works in all the MS Windows versions (95, 98, ME, NT, 2000, XP).
Specifications of functions-calling convention and
description of functions
Manufacturers of sound
cards do not always observe the Microsoft-allocated constants for API. We have
found a way to solve this serious problem and our library can work with most
sound cards. In the event that you do find a sound card problem while using our
library, we will greatly appreciate your sending us its description. The best
way to help us improve our product is to download the Testing Program (223 kB). This
program will read the information about your sound card and save it to an RTF
file that should be sent to us along with a description of your troubles. These
two pieces of information will enable us to analyze the problem and add your
sound card to our library.
List of functions
Notes
- Our library may not control all the channels or
controlling elements of some sound cards. However, we tried to include all the
important channels and controlling functions that multimedia developers use.
- Not all sound cards and their drivers feature the
channels and controlling elements implemented by us. In such case the
functions will not interfere with your system and no error warning will
appear.
- It is possible that one controlling element in some
sound cards affects more channels - for example, a microphone for playing
channel and for recording channel uses the same control. This is not an error
of the library; it is a feature of the specific sound card and its driver.
- Recommendations for usage of MUTE and SELECT control
elements. If you want to be sure you did your best to make the selected
channel run, you should choose the channel and switch off its MUTE:
- dmm_SetSelect(channel,true)
- dmm_SetMute(channel,false)
- The SELECT controlling element behaves differently
than other elements which are always channel-independent. With some sound
cards the SELECT element is used as a CheckBox. This means that it behaves
independently; in a similar way as MUTE function does (more
than one channel can be used at the same time). More often we see that the
SELECT element works as RadioButton - that means you cannot use two or more
channels at the same time. If you choose a channel, the previously-used
channel is switched off immediately. In such case, the selected channel can
only be switched off by choosing another channel.
Descriptions of functions
void =
dmm_RegVolume(code:string)You have to call this
function before you use the library dmm_volume.dll (dmm_volume.u32) for the
first time. If you do not insert the right registration Code, a dialog "this is
a demo version ..." will appear.
Parameters
The type of
code is STRINGG
(LPCSTR), for demo version code= "demo". In commercial versions the string is
unique for each license.
Exampledmm_RegVolume("demo")
volume =
dmm_GetVolume(channel:word)The function returns
the volume value (in %) of the selected channel. In case of an error the
function returns 0 (zero).
ParametresThe type of
channel is WORD and here you fill in the
channel code (see the channel constants table).
Examplecd = dmm_GetVolume(13)
volume =
dmm_SetVolume(channel:word, newVolume:word)The
function adjusts the volume value (in %) of the selected channel. The function
returns the value of newly adjusted volume. In case of an error the function
returns 0 (zero).
ParametresThe type of
channel is WORD and here you fill in the
channel code (see the channel constants table).
The type of
NewVolume
is WORD and it adjusts the volume level of the chosen channel (in %).
Examplewave =
dmm_SetVolume(11,75)
result =
dmm_IsSoundCard()The function returns "true" in
case the sound card is recognized by the OS. In case it is not recognized, the
function returns "false".
ParametresThe function has no
parametres.
Exampleif dmm_IsSoundCard()
then
......
else
......
end if
dmm_FadeTo(channel:word,
newVolume:word, fadeTime:word)The function
fluently adjusts the volume value of the selected channel from the actual value
to the newVolume value. The transition period is equal to the fadeTime
parameter. There is a possibility that this function may not work correctly in
Win95.
ParametresThe type of
channel is WORD and here you fill in the
channel code (see the channel constants table).
The
type of
NewVolume is WORD and it adjusts the
volume level of the chosen channel (in %).
The type of
FadeTime is WORD and you work with
miliseconds.
Note: The function
uses threads and enables you to work with several channels at the same time.
Exampledmm_FadeTo(10,75,2000)
dmm_FadeTo(12,50,1000)
mute =
dmm_GetMute(channel:word)The function returns
the state of the MUTE CheckBox. If the state is "true", the channel is switched
off. In case of an error, or in case the channel is on, the function returns
"false". We recommend to use this function together with the function
"dmm_GetSelect".
Parametres
The type of channel
is WORD and here you fill in the channel code (see the channel constants
table).
Exampleif
dmm_GetMute(channel) then
......
else
......
end if
mute = dmm_SetMute(channel:word,
newMute:boolean)The function adjusts the state
of MUTE. The function gives you the level of the CheckBox MUTE. If it is "true",
the channel is switched off. In case of an error or in case the channel is on
the function gives "false". We recommend to use this function together with the
function "dmm_SetSelect".
Parametres
The type of channel
is WORD and here you fill in the channel code (see the channel constants
table).
The type of NewMute
is BOOLEAN and it adjusts the CheckBox MUTE. For newMute=true the chosen
channel is switched off, for newMute=false the chosen channel is switched
on.
Examplemute =
dmm_SetMute(13,true)
select =
dmm_GetSelect(channel:word)The function gives
you the state of the RadioButton/CheckBox SELECT. If it is "true" the
channel is chosen. We recommend you to use this function together with the
function "dmm_GetMute".
Parametres
The type of channel
is WORD and here you fill in the channel code (see the channel constants
table).
Exampleselect =
dmm_GetSelect(12)
select =
dmm_SetSelect(channel:word, newSelect:boolean)The function adjusts SELECT. The function gives you
the state of the RadioButton/CheckBox SELECT. If it is "true" the channel
is chosen. In case of an error or in case the channel is off, the function gives
"false". We recommend you to use this function together with the function
"dmm_SetMute".
Parametres
The type of channel
is WORD and here you fill in the channel code (see the channel constants
table).
The type of NewSelect is BOOLEAN and it adjusts
RadioButton/Check Box SELECT. If newSelect=true then the channel is
chosen.
Exampleselect
=dmm_SetSelect(14, true)
Channel constants:
| MASTER play |
10 |
|
MASTER rec |
20 |
| WaveAudio play |
11 |
WaveAudio rec |
21 |
| MIDI play |
12 |
MIDI rec |
22 |
| CD audio play |
13 |
CD audio rec |
23 |
| Line In play |
14 |
Line In rec |
24 |
| Microphone play |
15 |
Microphone rec |
25 |
Demoversion download
Fully-functional testing versions of the DLL (U32),
that can be used in most of programming languages, are available for download
(these demo versions are fully functional, but the library will show a dialog
window).
Licensing
- Developer license
This license authorizes the developer to use the
component while creating his own applications and add the component free of
charge to the applications he has created. Under no circumstances is the
developer permitted to distribute the component independently, include it in
applications created by a third party, and disclose the Code to a third
party.
Price of Developer License is 50,- € (EUR).
- Company licencs
This license authorizes all company developers to use the
component while creating their own applications and the company is permitted
to add the component free of charge to the applications they have produced.
Under no circumstances is the company permitted to distribute the component
independently, include it in applications created by a third party, and
disclose the Code to a third party.
Price of Company
License is 100,- € (EUR).
Volume Component can be bought in our SHOP.