List of methods
new |
|
XTRA initialisation |
registration |
|
Registration of XTRA dmmMIX.x32 |
xtraVersion |
|
Finding out of version of XTRA dmmMIX.x32. |
errorMsg |
|
The function gives information about an error occured while working with the XTRA |
isNoError |
|
Test made to show whether an error occured during work with the XTRA |
errorDialog |
|
A preselection giving choice to show the dialogue window with error statement. |
errorLog |
|
A preselection giving choice to save errors to log file. |
isSoundCard |
|
Test done to find out if a sound card is installed |
getVolume |
|
Getting the level of volume(0-100%) |
setVolume |
|
Adjustment of volume(0-100%) |
getMute |
|
Test of state of the Check Box MUTE |
setMute |
|
Adjustment of the Check Box MUTE |
getSelect |
|
Test of state of the RadioButton/Check Box SELECT |
setSelect |
|
Adjustment of the RadioButton/Check Box SELECT |
fadeTo |
|
Fluent fading-in, fading-out |
Channel constants:
MASTER play |
#masterPlay |
|
MASTER rec |
#masterRec |
WaveAudio play |
#wavePlay |
WaveAudio rec |
#waveRec |
MIDI play |
#midiPlay |
MIDI rec |
#midiRec |
CD audio play |
#cdPlay |
CD audio rec |
#cdRec |
Line In play |
#linePlay |
Line In rec |
#lineRec |
Microphone play |
#microphonePlay |
Microphone rec |
#microphoneRec |
|
Description of function
-----------------------------------------------------------------------------------------------------------------------------------------------------------
new
It is necessary to initiate the dmmXLS XTRA before the first use.
Example - Director
global mix
openXlib the pathName&"dmmMIX.x32"
mix =new(xtra "dmmMIXER")
If the library dmmMIX .x32 is located in the XTRAS folder it is enough to insert
global mix
mix =new(xtra "dmmMIXER")
Example - Authorware
mix :=NewObject("dmmMIXER")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
void=registration( name: string, code:string)
This function has to be called before the first use of the dmmMIX immediately after its initialisation. Unless the right registration name and number are inserted, an announcement "this is a demo version" will appear.
Parametres
Type of name is string, for the demo version name = "dmm".
Type of code is string, for the demo version code= "demo". The chain for commercial version is unique.
To register the user will receive parameters code and name.
Very important
For safety reasons incorrect parameters can be only inserterted 3 times in the function registration. If you insert incorrect parameters name and code more times the registration is blocked and the XTRA will not work. You will be informed about it by a dialogue window. In this case you´ve got to restart Director or Authorware.
Note: Parameters name="dmm" and code="demo" are not considered as incorrect.
Example - Director
global mix
mix .registration("dmm", "demo")
Example - Authorware
CallObject(mix ; "registration"; "dmm"; "demo")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
list=xtraVersion()
The function returns information about the XTRA dmmMIX. The function returns values in the format Abstract Data Types:
[#fileType: "Xtra (32)",
#CompanyName: "Studio dmm",
#FileDescription: "XTRA dmmMix for control of volume in Windows",
#FileVersion: "2.0.0.4",
#InternalName: "dmmMix",
#LegalCopyRight: "© 1992-2005 Studio dmm",
#LegalTradeMarks: "",
#OriginalFileName: "dmmMix",
#productName: "dmmMix",
#productVersion: "2.0.0.0"]
The meaning of the items is clear and it is not necessary to describe it closer.
Parametres
There are no parametres in this function.
Example - Director
global mix
xv=mix.xtraVersion()
put "FileDescription:" && xv.FileDescription
put "FileVersion:" && xv.FileVersion
Example - Authorware
xv:=CallObject(mix; "xtraVersion")
Trace("FileDescription: " ^ xv[#FileDescription])
Trace("FileVersion: " ^ xv[#FileVersion])
-----------------------------------------------------------------------------------------------------------------------------------------------------------
string=errorMsg()
The function gives text of the error that occured while workng with dmmMIX. If everything went well, the function gives an empty chain
Parametres
There are no parametres in this function.
Example - Director
global mix
error=mix.errorMsg()
if error="" then .....
Example - Authorware
error:=CallObject(mix; "errorMsg")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean=isNoError()
The function gives back true, if no error occured during an operation. If an error occurs the function gives back false.
Parametres
There are no parametres in this function.
Example - Director
global mix
if mix.isNoError() then ....
Example - Authorware
error:=CallObject(mix; "isNoError")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
void=errorDialog(dialog: boolean)
Using this function we can set whether a dialogue window, showing error statement appears at the moment of an error or not. This setting only functions in Autor mode and it simplifies the application debugging. If you decide not to set the dialogue window you can check the errors using the function errorMsg().
Parametres
Dialog is the only parameter of the function, whose type is boolean. If the value is true, the dialogue window with error statement is opened with every error in the XTRA. For the parameter value false the window is not shown. Default setting is dialog=false.
Example - Director
global mix
mix.errorDialog(true)
Example - Authorware
CallObject(mix; "errorDialog"; true)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
void=errorLog(logFile: string, logSave: boolean)
Using this function we can set whether an error is saved to text log file at the time of the error or not. This setting only functions in Autor mode and it simplifies the application debugging.
Parametres
The function has two parametres. The parameter logFile represents name of the log file that we want to save the errors to. Type of the logSave parametre is boolean. If its value is true, every error in the XTRA is saved to log file. If its value is false nothing will be saved. Default setting is logSave=false.
Example - Director
global mix
mix.errorLog(the pathName&"log.txt", true)
Example - Authorware
CallObject(mix; errorLog; FileLocation ^ "log.txt"; true)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean=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 - Director
global mix
if mix.isSoundCard() then
......
else
......
end if
Example - Authorware
test:=CallObject(mix ; "isSoundCard")
-----------------------------------------------------------------------------------------------------------------------------------------------------------
integer =getVolume(channel:symbol)
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 symbol and here you fill channel values(see the channel constants table).
Example - Director
global mix
cd=mix.getVolume(#cdPlay)
Example - Authorware
cd:=CallObject(mix ; "getVolume"; #cdPlay)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
integer =setVolume(channel:symbol, 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 symbol 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 - Director
global mix
wave=mix.setVolume(#wavePlay,75)
Example - Authorware
wave:=CallObject(mix ; "setVolume"; "setVolume";#wavePlay;75)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean=getMute(channel:symbol)
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 symbol and here you fill channel values(see the channel constants table).
Example - Director
global mix
if mix.getMute(#masterRec) then
......
else
......
end if
Example - Authorware
mute:=CallObject(mix ; "getMute"; #masterRec)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean = setMute(channel:symbol, 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 symbol 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 - Director
global mix
mute=mix.setMute(#waveRec, true)
Example - Authorware
mute:=CallObject(mix ; "setMute"; #waveRec; true)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean= getSelect(channel:symbol)
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 symbol and here you fill channel values(see the channel constants table).
Example - Director
global mix
select = mix.getSelect(#midiPlay)
Example - Authorware
select: =CallObject(mix ; "getSelect"; #midiPlay)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
boolean= setSelect(channel:symbol, 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 symbol 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 - Director
global mix
select=mix.setSelect(#masterPlay, true)
Example - Authorware
select=CallObject(mix ; "setSelect"; #masterPlay; true)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
void=fadeTo(channel:symbol, 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 symbol 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 - Director
global mix
mix.fadeTo(#masterPlay,75,2000)
mix.fadeTo(#wavePlay,50,1000)
Example - Authorware
CallObject(mix ; "fadeTo"; #masterPlay;75,2000)
|