All four Wave file editing methods share the same general characteristics:
Return True if successful or False if an error occurs. When an error occurs, a message is logged in VBVLog describing the reason.
The two Wave files must be of same format, and both mono or both stereo.
Wavefile1 and Wavefile2 are file names with a partial or fully qualified path; if a partial path is supplied, the project voice directory or the default VBVoice system directory is searched for the file.
Wavefile1 and Wavefile2 can't refer to the same file.
Method can be called when the system is stopped (use 0 for Channel).
NOTE: In all the Wave editing functions below,the Position1 and Position2 parameters are represented as Long(s). This convention has been designed to work with the VB6 environment. However, because the Long data type is different in VB.NET, you must cast the position parameters to Integers.
(ByVal channel as Integer, ByVal Wavefile1 as String, ByVal Wavefile2 as String)
This utility method appends the contents of wavefile2 to the end of wavefile1.
(ByVal channel as Integer , ByVal FileName1 as String, ByVal OutFileName as String, ByVal Position1 as Long, ByVal Position2 as Long)
This utility method creates OutFileName having the contents of the audio data of FileName1 between Position1 and Position2.
(ByVal channel as Integer, ByVal FileName1 as String, ByVal FileName2 as String, ByVal OutFileName as String, ByVal Position1 as Long)
This utility method creates OutFileName having the contents of FileName1 plus FileName2 inserted at Position1 of FileName1.
(ByVal channel as Integer, ByVal FileName1 as String, ByVal FileName2 as String, ByVal OutFileName as String, ByVal Position1 as Long, ByVal Position2 as Long)
This utility method creates OutFileName having the contents of FileName1 overwritten by contents of FileName2 from Position1 till Position2 of FileName1.
(LicenseName As String) As Integer
Use this method to determine how many custom licenses under a particular license name are loaded and activated on the RTM.
(LicenseName As String) As Integer
Grabs and reserves one license under a particular license name. LicenseName is composed of the prefix you chose to distinguish your custom licenses from other licenses plus your custom license name. See Naming of Custom Licenses.
(LicenseName As String) As Integer
Use this method to determine how many available custom licenses can be reserved on the RTM under a particular license name.
(LicenseName As String, LicenseID As Integer)
Releases a custom license. Requires the license name used to reserve the license and the license ID that was returned upon license grabbing.
ShowLineStatus (Show as Boolean)
Shows or hides the LineStatus window. The LineStatus window can also be embedded in your own form using the LineStat OCX. If using the control, you are not able to show the system provided window. See LineStatus Control.
ShowLogwindow (Channel as Integer, Show as Boolean)
Shows or hides the log windows. There is a log window for each channel, contained within the VBVLog application. The VBVLog application is started if necessary.
StartSystem(ShowStatus as Boolean)
StartSystem performs the same function as the StartSystem option in the run mode context menu.
Before the system starts, all controls on all loaded forms are checked for errors. When this method is executed from the Context menu, the line status application is automatically started. When called form code, the method provides a parameter, ShowStatus, to control display of the status application. The line status application is specified by the LineStat INI file setting is started, the default is vbvlog.exe.
Once the system is started, stop voice operations with StopSystem.
If an error occurs while starting the system, the method generates a trappable error. See vbvStartSystemErrorConstants for possible error values.
StopSystem(KillChannels as Boolean) As Integer
Once the system is started, you can stop voice operations with the StopSystem method. If KillChannels is False, VBVoice waits for all lines to clear before terminating. The LineStatus window is shown until all calls have been completed. If KillChannels is true, VBVoice attempts to halt all the lines immediately, terminating any calls currently on the line. The method returns True if successfully shutdown, or False if the shutdown is not yet complete (there are still channels active).
If VBVoice is able to shut down all channels immediately, a ShutDown event occurs while processing the method, the LineStatus window is closed, and the method returns True. This will only occur if all lines are idle when the method is called.
If some lines are active (including waiting for ring or in a pre-call delay state) when the method is called, the following occurs:
The LineStatus window appears and marks all idle lines as Waiting for Shutdown.
NOTE: The default LineStatus window is the VBVLog application. To prevent the VBVLog application from automatically starting while when initiating a Stopsystem, set the LineStat setting in the [System] section of vbvoice.ini to an empty string.
The ShutDown event occurs when all lines are idle and the system is stopped.
The OffHookIdle INI setting controls whether the lines are left onhook (default) or offhook after shutdown. This is useful in systems spread across more than one machine, when using a hunt group to distribute calls. As one system shuts down, the lines are made busy and the calls forward to the second machine. See OffHookIdle.
SystemStarted as Boolean
A Boolean which returns True if the system is already started or False otherwise. This method has no parameters.
EXAMPLE
To start the system:
If Not VBVFrame1.SystemStarted Then
VBVFrame1.StartSystem True
End If
To stop the system:
If VBVFrame1.SystemStarted Then
VBVFrame1.StartSystem False
End If