TAPIEx ActiveX Control v3.6

MemoryBuffers

The MemoryBuffers interface manage the IMemoryBuffer interface and provides COM-standard enumeration methods for the IMemoryBuffer interface.

It loads all the wave files into the system memory and all the lines device can share the same buffers. It improves performance in multi-lines IVR system. This feature is useful for creating smooth IVR menus, saying numbers and dates or other simple to complex phrases.

For more detail about how to use MemoryBuffers, please refer our "Simple IVR MemoryBuffers" demo sample.

Properties Description
RootDirectory set/returns the root directory.

 

Methods Description
AddNew Create new item and load the specified wave file into the memory buffer of our control.
AddNewEx Create new item and load the specified wave file which in safearray into the memory buffer of our control.
AddNewEx2 Create new item and load the specified wave file which in memory into the memory buffer of our control.
ClearAll Clear all the items and free the allocated resource.
DeleteItem Delete the specified item(IMemorybuffer).
LoadFromList Load the wave files from the list.

Example:

 
  Set g_MemBuffers = New MemoryBuffers    ' create the instance of IMemoryBuffers
  g_MemBuffers.RootDirectory = "../../wave_pcm/" ' set the root directory  

  g_MemBuffers.AddNew "TIMEOUT", "Timeout.wav"    'Load the single file

												   ' Load a list of files
  g_MemBuffers.LoadFromList "WELCOME   welcome.wav" & vbCrLf & _
                            "MENU      menu.wav" & vbCrLf & _
                            "REC_END   rec_end.wav" & vbCrLf & _
                            "MENU_OPT1 Menu_Opt1.wav" & vbCrLf & _
                            "MENU_OPT2 Menu_Opt2.wav" & vbCrLf & _
                            "MENU_OPT3 Menu_Opt3.wav"
	
  ' Play the MemoryBuffers
  ITAPICall.PlayMemoryBuffer g_MemBuffers("TIMEOUT")
  ITAPICall.PlayMemoryBuffer g_MemBuffers("WELCOME")


See Also

IMemoryBuffer, PlayMemoryBuffer