(Page 38 of 41 in this chapter) Version
vceStop
Description
- Stops the currently active play or record.
Prototype
- DWORD vceStop ( CTAHD ctahd)
- ctahd Handle returned by ctaCreateContext.
Return Values
Events
Details
- This function sends a command to the player/recorder service to stop playing or recording. Successful completion of the command is indicated with a VCEEVN_PLAY_DONE event or a VCEEVN_RECORD_DONE event with the value field of the event containing CTA_REASON_STOPPED. If playing or recording had already ended when the stop command was sent, the event will contain a different reason.
- Because play or record may have already ended, this function returns SUCCESS even if play and record is not active. Therefore, a return of SUCCESS does not guarantee that a DONE event is pending. It is up to the application to determine whether play or record was started and, therefore, whether or not to expect a DONE event.
See Also
- vcePlay
, vcePlayList, vcePlayMessage, vceRecord, vceRecordMessage
Example
/* Play message until stopped by keyboard event*/
extern CTAHD CtaHd;
extern CTAQUEUEHD CtaQueueHd;
void myPlayMessage (VCEHD vh, unsigned message)
{
CTA_EVENT event;
vcePlayMessage (vh, message, NULL);
do
{
ctaWaitEvent( CtaQueueHd, &event, CTA_WAIT_FOREVER);
if (event.id == KBDEVN_KEY)
vceStop(CtaHd);
} while (event.id != VCEEVN_PLAY_DONE); /* Ignore other events */
}
(Page 38 of 41 in this chapter) Version
Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights
reserved.