Voice API Programming Guide — June 2005 99
Recording and Playback
•Recommendation for the high water mark: it should be based on the following:
(size of the circular stream buffer) minus (two times the size of the bulk queue buffer)
For example, if the circular stream buffer is 100kbytes, and the bulk queue buffer size is
8k bytes, set the high water mark to 84kbytes. (The bulk queue buffer size is set through the
dx_setchxfercnt() function.)
•Recommendation for the low water mark:
–If the bulk queue buffer size is less than 8 kbytes, the low water mark should be four times
the size of the bulk queue buffer size.
–If the bulk queue buffer size is greater than 8 kbytes and less than 16 kbytes, the low water
mark should be three times the size of the bulk queue buffer size.
–If the bulk queue buffer size is greater than 16 kbytes, the low water mark should be two
times the size of the bulk queue buffer size.
•When a TDX_LOWWATER event is received, continue putting data in the circular stream
buffer. Remember to set STREAM_EOD flag to EOD on the last piece of data.
•When a TDX_HIGHWATER event is received, stop putting data in the circular stream buffer.
If using a text-to-speech (TTS) engine, you will have to stop the engine from sending more
data. If you cannot control the output of the TTS engine, you will need to control the input to
the engine.
•It is recommended that you enable the TDX_UNDERRUN event to notify the application of
firmware underrun conditions on the board. Specify DM_UNDERRUN in dx_setevtmsk().
8.11 Pause and Resume PlayThe voice library provides functionality for pausing a playback and resuming a playback. This
functionality is discussed in the following topics:
•Pause and Resume Play Overview
•Pause and Resume Play Functions
•Implementing Pause and Resume Play
•Pause and Resume Play Hints and Tips
8.11.1 Pause and Resume Play Overview
The pause and resume play functionality enables you to pause a play that is currently in progress
and later resume the same play. The play is resumed at the exact point it was stopped without loss
of data.
The pause and resume play functionality works using one of the following methods:
•using a pre-defined DTMF digit, set up similarly to speed and volume control in the
DX_SVCB data structure.
•programmatically using the dx_pause() and dx_resume( ) functions.
All voice encoding methods available in the voice library are supported for this feature. There are
no restrictions.