The development of components and products
   
 
 


Dll and u32 libraries for the control of volume -
addition for the control of volume in Windows for programmers
© 1992-2003 MMSW and Studio dmm, all rights reserved

Licencing information
This software is a commercial product. If you are a registred user, no royalty-fees are required for distribution
of the software with your applications.
By using the software you're agreeing to the terms and conditions of the Licence Agreement.

Demoversion download
Fully working testing version of the dll (u32) library available, examples in programming languages listed below are enclosed (the demo version is fully working but the library will show a dialogue window).

Authorware 4, 5, 6 demo (220 kB)
Delphi 6 demo (300 kB)
ToolBook 6 demo (100 kB)
VB .NET framework demo (110 kB)

Desription
The control of volume is realized by the dll (u32) library. The library can work in all the MS Windows versions (95, 98, ME, NT, 2000 and XP).

Library is compatible with
Authorware 3, 3.5, 4, 5, 6, 6.5, 7
Delphi 2, 3, 4, 5, 6, 7
Toolbook 6, 6.5, 7, 7.1, 7.2, 8, 8.5
Visual Basic, language C and others
.NET framework

History
01/02/2003   Version 2.7   The administration of memory was adjusted
15/12/2002   Version 2.6   Functions dmm_GetSelect, dmm_SetSelect were added
14/12/2002   Version 2.5   Functions dmm_GetMute, dmm_SetMute were added
16/11/2002   Version 2.4   The function dmm_IniVolume was renamed to dmm_RegVolume
The function dmm_FadeTo was added
09/07/2002     Version 2.3     The function dmm_SoundCard was added
02/04/2002   Version 2.2   Adjustment for Win2000 and WinXP was done
07/05/2001   Version 1.1-2.1   Adjustment for several non-standard sound cards
02/02/2001   Version 1.0   Foundation of the library

Possibilites of utilization
Because the control of MIXER in MS Windows is not well solved in any programming language or author tools, we´ve decided to develop on our own. You can see yourselves how successful we were. Control of volume is driven by the XTRAS library. The library can work in all the MS Windows versions (95, 98, ME, NT, 2000, XP)

Specifications of functions-calling convention and description of functions
Producers of sound cards do not always observe constants of API Windows, which are allocated by Microsoft. We have found a way to solve this serious problem so that our library can work with most of the sound cards. If you find any problem, we will be grateful if you describe it so that we are able to solve it. The best way is to download the programme Test (223 kB), which will read the information about your sound card, will save it to the file RTF. You may send it to us with a description of your troubles enclosed. Then we will be able to add your sound card to our dll (u32) library.

List of functions
dmm_RegVolume     Registration of dll (u32)
dmm_GetVolume   Getting the level of volume(0-100%)
dmm_SetVolume   Adjustment of volume(0-100%)
dmm_IsSoundCard   Test done to find out if a sound card is installed
dmm_FadeTo   Fluent fading-in, fading-out
dmm_GetMute   Test of state of the Check Box MUTE
dmm_SetMute   Adjustment of the Check Box MUTE
dmm_GetSelect   Test of state of the RadioButton/Check Box SELECT
dmm_SetSelect   Adjustment of the RadioButton/Check Box SELECT

Notes
  Our dll (u32) library needn´t control all the possible channels or controlling elements of sound cards. We tried to include the important channels and controlling functions, which can be used in multimedia applications.
  Not all sound cards and their drivers include the channels and controlling elements implemented by us. In that case the function does nothing and furthermore it doesn´t show any error warning.
  With some sound cards it is possible that one controlling element affects more channels- for example microphone for playing and for recording only uses one control. It is not an error of the library, it is a feature of the concrete sound card and its driver.
  Recommendations for usage of MUTE and SELECT. 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 the other elements, which are always channel independent. With some sound cards the SELECT element is used as a Check Box.It means that it behaves as independently as MUTE (it is possible to use more than one channel at the same time). It is more often that it works as RadioButton, which means you cannot use two or more channels at the same time.If you choose one channel the previous one is switched off immediately. The chosen channel can only be switched off by choosing another channel.

Description of function
-----------------------------------------------------------------------------------------------------------------------------------------------------------
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 number, a note saying this is a demo version will appear.

Parametres
The type of code is string (lpcstr), for demo version code= "demo". In commercial versions the chain is unique.

Example
dmm_RegVolume("demo")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
volume =dmm_GetVolume(channel:word)

The function gives the volume level of the chosen channel(in %). In case of an error the function shows 0(zero).

Parametres
The type of channel is word and here you fill channel values(see the channel constants table).

Example
cd=dmm_GetVolume(13)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
volume =dmm_SetVolume(channel:word, newVolume:word)
The function adjusts the volume level. The function gives the level of newly adjusted volume in the chosen channel (in %). In case of an error the function shows 0(zero).

Parametres
The type of channel is word and here you fill channel values(see the channel constants table).
The type of NewVolume is word and it adjusts the volume level of the chosen channel(in%).

Example
wave=dmm_SetVolume(11,75)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
result=dmm_IsSoundCard()
The function gives "true" in case the sound card is installed. In case it is not installed, the function shows "false".

Parametres
The function has no parametres.

Example
if dmm_IsSoundCard() then
    ......
   else
    ......
end if
-----------------------------------------------------------------------------------------------------------------------------------------------------------
dmm_FadeTo(channel:word, newVolume:word, fadeTime:word)
The function fluently adjusts volume of the chosen channel from the actual level to the newVolume level.
The adjustment will take time, which is equal to the fadeTime parameter. It is possible that this function will not work correctly in Win95.

Parametres
The type of channel is word and here you fill channel values(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 library uses threads, so it is possible to work with several channels at the same time.

Example
dmm_FadeTo(10,75,2000)
dmm_FadeTo(12,50,1000)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
mute=dmm_GetMute(channel:word)
The function gives you the level of the Check Box 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 "GetSelect".

Parametres
The type of channel is word and here you fill channel values(see the channel constants table).

Example
if dmm_GetMute(channel) then
    ......
   else
    ......
end if
-----------------------------------------------------------------------------------------------------------------------------------------------------------
mute = dmm_SetMute(channel:word, newMute:boolean)
The function adjusts state of MUTE. The function gives you the level of the Check Box 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 "SetSelect".

Parametres
The type of channel is word and here you fill channel values(see the channel constants table).
The type of NewMute is boolean and it adjusts the Check Box MUTE. For newMute=true the chosen channel is switched off, for newMute=false the chosen channel is switched on.

Example
mute=dmm_SetMute(13,true)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
select = dmm_GetSelect(channel:word)
The function gives you the level of the RadioButton/Check Box SELECT. If it is "true" the channel is chosen. We recommend to use this function together with the function "GetMute".

Parametres
The type of channel is word and here you fill channel values(see the channel constants table).

Example
select = dmm_GetSelect(12)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
select = dmm_SetSelect(channel:word, newSelect:boolean)
The function adjusts SELECT. The function gives you the level of the RadioButton/Check Box SELECT. If it is "true" the channel is chosen. 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 "SetMute".

Parametres
The type of channel is word and here you fill channel values(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.

Example
select=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

 


© Studio dmm 1992-2005, all rights reserved, other information regarding our components: software@dmm.cz