Wave Sample Program

The Wave sample program demonstrates how to utilize the
features of the etPlay and etRecord controls. The illustrations show in
the document were taken from the Visual Basic 5 & 6 sample program.
The VB versions of this sample program utilize one form for each edition
of TeleTools. With other environments like Delphi and C++ Builder, tab
controls were utilized for the user interface. It is important to note
that the features available for the etPlay and etRecord controls is
related to the edition of TeleTools.
TeleTools Express

TeleTools Express does not support the etPlay or etRecord
controls.
TeleTools Standard

The Standard edition of TeleTools allows you to play and
record wave files.
The Play drop down list box displays the names of all the available wave
play audio devices.
When the form is loaded this list box is filled will all of the wave play
device names listed in the etPlay.Device.List property.
When a user selects a device the etPlay.Device.ID property is set.
The Record drop down list box displays the names of all the available wave
record audio devices.
When the form is loaded this list box is filled will all of the wave
record device names listed in the etRecord.Device.List property.
When a user selects a device the etRecord.Device.ID property is set.
The etPlay and etRecord controls are used only for this portion of the
Wave sample program.
The TeleScope button displays the TeleScopes for the etPlay and etRecord
controls.
When the user clicks this button the etPlay and etRecord TeleScope.Visible
properties are set to display or hide the controls' TeleScopes.
The "Play a Wave File" group box contains the user interface for
working with the etPlay control.
The edit box is used to enter the path and name of the wave file to be
played.
The Text property of this Edit box is used to set the
etPlay.Source.Filename property.
The Start button is used to begin playing the wave file or files.
Clicking this button sets the etPlay.Device.Active property to True.
The Stop Button is used to stop playing the wave file.
Clicking this button sets the etPlay.Device.Active property to False.
The Loop check box indicates to the etPlay control to play the wave file
again or not after playing is complete.
When this is checked the etPlay.Device.Loop property is set to True.
The Seconds label indicates the size of the current file.
This label is updated with the value in the property
etPlay.Source.Format.Seconds when the etPlay.OnLoaded event fires.
The Position label indicates the current position in the file that the is
currently playing.
This label is updated with the value in the property
etPlay.Position.Second each time the etPlay.OnTimer event fires.
The "Record a Wave File" group box contains the user interface
for working with the etRecord control.
The edit box is used to enter the path and name of the wave file to be
recorded.
The Text property of this Edit box is used to set the
etRecord.Source.Filename property.
The Start button is used to begin recording the wave file.
Clicking this button sets the etRecord.Device.Active property to True.
The Stop Button is used to stop recording the wave file.
Clicking this button sets the etRecord.Device.Active property to False.
The Seconds label indicates the size of the current file.
This label is updated with the value in the property
etRecord.Source.Format.Seconds when recording is complete, the
etRecord.OnDone event fires.
TeleTools Professional

With the Professional edition you all the features of the
Standard edition. You also have the ability to pause, fast forward and
rewind.
The FF button is used to Fast Forward when playing.
Clicking this button increases the value of the property
etPlay.Position.Percent by 10 percent.
The Rewind button is used to rewind when playing.
Clicking this button decreases the value of the property
etPlay.Position.Percent by 10 percent.
The Pause check boxes are used to pause and un-pause playing or recording.
Clicking these check box changes the value of the properties
etPlay.Device.Pause and etRecord.Device.Pause
TeleTools Enterprise

With TeleTools Enterprise you have all the features of the
Professional edition and a lot more. This portion of the Wave sample
program focuses on the use of Memory Buffers. It also show how use etPlay
and etRecord controls together to create a simple wave file editor.
The Memory Buffers contain a complete wave file as it
would appear in a disk file less the embedded information.
The Buffers drop down list is used to select the wave memory buffer to be
used. When this value is set to zero the no buffer is selected. This is a
list of the currently available memory buffers. The values in the are the
buffer handles represented as hexadecimal numbers.
When the list is dropped down it is filled with the handles of the
currently available memory buffers listed in the etPlay.Source.Buffer.List
property.
When a user selects a memory buffer the etPlay.Source.Buffer.Handle
property is set to the numeric value. The value in the list is first
converted from a string (hex) to a number.
The Play button plays the wave file contained in the currently selected
memory buffer.
When this button is clicked the properties etPlay.Source.Buffer.Active is
set to True so the etPlay control knows to use the memory buffer instead
of a file. The property etPlay.Source.Buffer.Handle is set to the
currently selected memory buffer. etPlay.Device.Pause is set to False and
etPlay.Device.Active is set to True to begin playing.
The Record button begins recording to the currently selected memory
buffer. The the buffer handle is set to zero then a new buffer will be
created. If a buffer is selected then it's contents will be overwritten.
When this button is clicked the properties etRecord.Source.Buffer.Active
is set to True so the etRecord control knows to use the memory buffer
instead of a file. The property etRecord.Source.Buffer.Handle is set to
zero to make sure that other buffers are not overwritten.
etRecord.Device.Pause is set to False and etRecord.Device.Active is set to
True to begin recording.
The Append button begins recording to the currently selected memory
buffer. The new wave data will be appended to the memory buffer.
When this button is clicked the properties etRecord.Source.Buffer.Active
is set to True so the etRecord control knows to use the memory buffer
instead of a file. The property etRecord.Source.Buffer.Handle is set to
the currently selected memory buffer. etRecord.Device.Pause is set to
False, etRecord.Device.Append is set to True and etRecord.Device.Active is
set to True to begin recording.
The Stop button is used to stop playing and recording.
When this button is clicked, if the program is playing a wave file then
the etPlay.Device.Active property is set to False. If the program is
recording then the etRecord.Device.Active property is set to False.
The FF button is used to Fast Forward when playing.
Clicking this button increases the value of the property
etPlay.Position.Percent by 10 percent.
The Rewind button is used to rewind when playing.
Clicking this button decreases the value of the property
etPlay.Position.Percent by 10 percent.
The Seconds label indicates the size of the current buffer.
This label is updated with the value in the property
etPlay.Source.Format.Seconds when an memory buffer is selected buffer and
when recording is complete, the etRecord.OnDone event fires.
The Position label indicates the current position in the buffer that the
is currently playing or paused.
This label is updated with the value in the property
etPlay.Position.Second each time the etPlay.OnTimer event fires, playing
begins, playing or recording is paused, playing is fast-forwarded or
rewound and playing or recording is started.
The DeleteBefore button is used to remove the wave data from beginning of
the buffer to the current position.
When clicking this button the current position is saved, the Stop button
click routine is called then the etPlay.Source.Buffer.DeleteBefore method
is called using the saved position.
The DeleteAfter button is used to remove the wave data from the current
position to the end of the buffer.
When clicking this button the current position is saved, the Stop button
click routine is called then the etPlay.Source.Buffer.DeleteAfter method
is called using the saved position.
The Pause check box is used to pause and un-pause playing or recording.
Clicking these check box changes the value of the properties
etPlay.Device.Pause and etRecord.Device.Pause
The Load button loads the file identified in the adjacent edit box into a
new memory buffer.
The Save button save the current memory buffer into the file identified in
the adjacent edit box.
The Free button frees the currently select memory buffer.
The Name edit box is used to update the Name embedded information of the
memory buffer.
When a file is loaded this field will be updated with the information
contained in the file.
When a memory buffer is saved to a file this field will be embedded into
the wave file.
The Comments edit box is used to update the Comments embedded information
of the memory buffer.
When a file is loaded this field will be updated with the information
contained in the file.
When a memory buffer is saved to a file this field will be embedded into
the wave file.
|