100 Voice API Programming Guide — June 2005
Recording and Playback
The pause and resume play feature is not supported on Springware boards.
8.11.2 Pause and Resume Play Functions
The following functions and data structure are used in the pause and resume play feature:
dx_pause()
pauses a play currently in progress until a subsequent dx_resume( ) is issued
dx_resume( )
resumes the play that was paused using dx_pause( )
dx_setsvcond()
sets adjustment condition for the play (in this case, a DTMF digit to pause/resume play)
DX_SVCB
data structure used by dx_setsvcond() to specify adjustment conditio ns for the play
Use these functions and data structure in conjunction with play functions, such as
dx_playiottdata( ) play function.
8.11.3 Implementing Pause and Resume Play
Follow these steps to implement pause and resume play in your application:
Note: These steps do not represent every task that must be performed to create a working application but
are intended as general guidelines for implementing pause and resume play.
1. Decide on whether to set DTMF digits to control the pause and resume play functionality. If
yes, set up the condition in the DX_SVCB data structure and call dx_setsvcond( ).
2. Set up the DX_IOTT data structure for the play operation.
3. Set up the DV_TPT data structure to specify termination conditions for the play.
4. Perform play operation on the channel; for example, use dx_playiottdata( ).
5. If you answered no to step 1, perform pause operation on the channel using dx_pause( ).
6. If you answered no to step 1, perform resume operation on the channel using dx_resume( ).
8.11.4 Pause and Resume Play Hints and Tips
Consider the following hints and tips when implementing pause play and resume play in your
application:
If a DTMF digit is set as a termination condition, play is terminated when this condition is met,
even if a play is currently paused. That is, the termination condition takes precedence over the
pause/resume condition.
For example, let’s say you set the digit 2 as a termination condition on a play. If you press this
digit during play or while the play is paused, the play will be terminated. The play will
terminate when the DTMF termination condition is met. If play is paused, it does not wait for
the play to resume. As another example, if you set 5 seconds as the termination condition on a
play, the play will terminate after 5 seconds. The timer runs regardless of the paused condition.