118 Voice API Programming Guide — June 2005
Speed and Volume Control
9.5 Play Adjustment Digits
The voice software processes play adjustment digits differently from normal digits:
If a play adjustment digit is entered during playback, it causes a play adjustment only and has
no other effect. This means that the digit is not added to the digit queue; it cannot be retrieved
with the dx_getdig( ) function.
On DM3 boards, digits that are used for play adjustment may also be used as a terminating
condition. If a digit is defined as both, then both actions are applied upon detection of that
digit.
On Springware boards, digits that are used for play adjustment will not be used as a
terminating condition. If a digit is defined as both, then the play adjustment will take priority.
If the digit queue contains adjustment digits when a play begins and play adjustment is set to
be level sensitive, the digits will affect the speed or volume and then be removed from the
queue.
9.6 Setting Play Adjustment Conditions
Adjustment conditions are set in the same way for speed or volume. The following steps describe
how to set conditions upon which volume should be adjusted:
1. Set up the volume modification table (if you do not want to use the defaults):
Set up the DX_SVMT structure to specify the size and number of the steps in the table.
Call the dx_setsvmt( ) function, which points to the DX_SVMT structure, to modify the
volume modification table (dx_setsvmt( ) can also be used to reset the table to its default
values).
2. Set up the DX_SVCB structure to specify the condition, the size, and the type of adjustment.
3. Call dx_setsvcond( ), which points to an array of DX_SVCB structures. All subsequent plays
will adjust volume as required whenever one of the conditions specified in the array occurs.
See the Voice API Library Reference for more information about these functions and data
structures.
9.7 Explicitly Adjusting Speed and Volume
Speed and volume adjustments are made in the same way. The following steps describe how to
adjust speed, but you can use exactly the same procedure for volume:
1. Set up the speed modification table (if you do not want to use the defaults):
Set up the DX_SVMT structure to specify the size and number of the steps in the table.
Call the dx_setsvmt( ) function, which points to the DX_SVMT structure, to modify the
speed modification table (dx_setsvmt( ) can also be used to reset the table to its default
values).
2. When required, call dx_adjsv( ) to adjust the speed modification table by specifying the size
and type of the adjustment.