Source.Buffer.CreateBuffer
Source.Buffer.DeleteAfter
Source.Buffer.DeleteBefore
Source.Buffer.FreeBuffer
Source.Buffer.LoadFromBuffer
Source.Buffer.LoadFromFile
Source.Buffer.LogProperties
Source.Buffer.SaveToFile
Also see Working
with Wave Files and Buffers
ActiveX: etPlay.SourceBufferCreateBuffer
etRecord.SourceBufferCreateBuffer
Return: Boolean
Parameters: Size: Integer
Edition: Enterprise
This method is used to create memory a buffer and load to be loaded by some other routine. The size
parameter is in bytes and must be large enough to hold the wave file header and data. If this method
returns True then the was memory buffer is created, the property etPlay1.Source.Buffer.Active is automatically
set to True, Source.Buffer.Handle is automatically set, Source.Buffer.MemoryPointer contains the memory
address to be used to directly access the buffer.
Delphi
if etPlay1.Source.Buffer.CreateBuffer(256*1024) then
begin
//Load the newly created buffer
Visual Basic 6
If etPlay1.SourceBufferCreateBuffer(256*1024) Then
'Load the newly created buffer
For more information see Alternate Wave File Sources in the topic Working with Wave Files and Buffers.
ActiveX: etPlay.SourceBufferDeleteAfter
etRecord.SourceBufferDeleteAfter
Return: Boolean
Parameters: Position: Single
Edition: Enterprise
This method is used to delete wave data wave from the position indicated in the Position parameter
to the end of the file. The header information and the property Source.Format.Bytes are automaticly updated.
The Position parameter indicates the position in seconds and is commonly used in conjuntion with the etPlay.Position.Seconds
property. The following example pauses the play of a wave file, deletes the data after the current position
then saves the file to disk:
Delphi
etPlay1.Device.Pause;
etPlay1.Source.Buffer.DeleteAfter(etPlay.Position.Seconds);
etPlay1.Source.Buffer.SaveToFile('C:\Wave\NewFile');
Visual Basic 6
etPlay1.DevicePause
etPlay1.SourceBufferDeleteAfter(etPlay.PositionSeconds)
etPlay1.SourceBufferSaveToFile("C:\Wave\NewFile")
ActiveX: etRecord.SourceBufferDeleteBefore
etPlay.SourceBufferDeleteBefore
Return: Boolean
Parameters: Position: Single
Edition: Enterprise
This method is used to delete the wave data from the begining of the file in the buffer to the the
position indicated in the Position parameter. The header information and the property Source.Format.Bytes
are automaticly updated. The Position parameter indicates the position in seconds and is commonly used
in conjuntion with the etPlay.Position.Seconds property. The following example pauses the play of a wave
file, deletes the data at from the begining of the file to the current position then saves the file to
disk:
Delphi
etPlay1.Device.Pause;
etPlay1.Source.Buffer.DeleteBefore(etPlay.Position.Seconds);
etPlay1.Source.Buffer.SaveToFile('C:\Wave\NewFile');
Visual Basic 6
etPlay1.DevicePause
etPlay1.SourceBufferDeleteBefore(etPlay.PositionSeconds)
etPlay1.SourceBufferSaveToFile("C:\Wave\NewFile")
ActiveX: etPlay.SourceBufferFreeBuffer
etRecord.SourceBufferFreeBuffer
Return: Boolean
Parameters: none
Edition: Enterprise
This method is used to free the current memory buffer identified in the Source.Buffer.Handle property.
The Source.Buffer.Count and Source.Buffer.List properties will be updated to reflect that freeing of the
buffer. For example:
Delphi
// Convert the handle in the list to Hex
etPlay1.Source.Buffer.Handle = StrToInt('$' + etPlay1.Source.Buffer.List[0]);
if not etPlay1.Source.Buffer.FreeBuffer then
begin
// Log an error
Visual Basic 6
' Convert the handle in the list to Hex
etPlay1.Source.BufferHandle = Val("&H" & etPlay1.SourceBufferList[0])
If Not etPlay1.SourceBufferFreeBuffer Then
'Log an error
ActiveX: etPlay.SourceBufferLoadFromBuffer
etRecord.SourceBufferLoadFromBuffer
Return: Boolean
Parameters: sHandle: String
Edition: Enterprise
This method is used to create a memory buffer and load the wave file data in to the buffer from one
or more existing memory buffers. The following example loads a buffer and plays the wave file from the
buffer:
Delphi
// Convert the handle in the list to Hex
etPlay1.Source.Buffer.LoadFromBuffer('$' + etPlay1.Source.Buffer.List[0]);
// etPlay1.Source.Buffer.Active is automatically set to True when the buffer is created
// etPlay1.Source.Buffer.Handle is automatically set when the buffer is created
etPlay1.DeviceActive := True; // Play the wave file
Visual Basic 6
' Convert the handle in the list to Hex
etPlay1.SourceBufferLoadFromBuffer("&H" & etPlay1.SourceBufferList[0])
' etPlay1.SourceBufferActive is automatically set to True when the buffer is created
' etPlay1.SourceBufferHandle is automatically set when the buffer is created
etPlay1.DeviceActive = True 'Play the wave file
For more information see Combining Files or Buffers in the topic Working with Wave Files and Buffers.
ActiveX: etPlay.SourceBufferLoadFromFile
etRecord.SourceBufferLoadFromFile
Return: Boolean
Parameters: sFileName: String
Edition: Enterprise
This method is used to create a memory buffer and load the wave file data in to the buffer from one
or more files. The following example loads a buffer and plays the wave file from the buffer:
Delphi
etPlay1.Source.Buffer.LoadFromFile('C:\Wave\Greeting');
// etPlay1.Source.Buffer.Active is automatically set to True when the buffer is created
// etPlay1.Source.Buffer.Handle is automatically set when the buffer is created
etPlay1.DeviceActive := True; // Play the wave file
Visual Basic 6
etPlay1.SourceBufferLoadFromFile("C:\Wave\Greeting")
' etPlay1.SourceBufferActive is automatically set to True when the buffer is created
' etPlay1.SourceBufferHandle is automatically set when the buffer is created
etPlay1.DeviceActive = True 'Play the wave file
For more information see Combining Files or Buffers in the topic Working with Wave Files and Buffers.
ActiveX: etPlay.SourceBufferLogProperties
etRecord.SourceBufferLogProperties
Return: Boolean
Parameters: Title:
String
ParentProp: String
Indent: String
Edition: Enterprise
This method dumps the current value of the control's Source.Buffer properties to its TeleScope.Log.
This is very useful for debugging. Also see Common
Methods <>.LogProperties.
ActiveX: etPlay.SourceBufferSaveToFile
etRecord.SourceBufferSaveToFile
Return: Boolean
Parameters: sFileName: String
Edition: Enterprise
This method is used to save the wave file contained in the current memory buffer to a file. The Embedded
Information property will also be saved in the file. This method does not free the buffer, see Source.Buffer.FreeBuffer.
The following examples saves the contents of the first buffer in the list of available buffers then frees
the buffer:
Delphi
// Convert the handle in the list to Hex
etPlay1.Source.Buffer.Handle = StrToInt('$' + etPlay1.Source.Buffer.List[0]);
if etPlay1.Source.Buffer.SaveToFile('C:\Wave\NewFile.wav') then
etPlay1.Source.Buffer.FreeBuffer;
Visual Basic 6
' Convert the handle in the list to Hex
etPlay1.Source.BufferHandle = Val("&H" & etPlay1.SourceBufferList[0])
If etPlay1.SourceBufferSaveToFile("C:\Wave\NewFile.wav") Then
etPlay1.Source.BufferFreeBuffer
End If