The following code illustrates how to seek a specified point in the stream source object or set the current stream time.
#define INCL_ERRORS
#include "os2.h"
#include "os2me.h"
#include "mcd.h"
#include "audio.h"
ULONG rc; /* error return code */
HID hidSource; /* source handler ID */
HSTREAM hStream; /* stream handle */
ULONG ulMsgType; /* type of message */
MSG_COMMON pMsg;/* message control block*/
.
.
.
/*----------------------------------------------------------------*/
/* Create a data stream from a source stream handler to a target */
/* stream handler. (See SpiCreateStream). */
/*----------------------------------------------------------------*/
.
.
.
/*------------------------------------------------------------------*/
/* Fill in message from a source stream handler to a target handler*/
/* */
/*------------------------------------------------------------------*/
ulMsgType = STREAM_HANDLER_SPECIFIC_MESSAGE_NUMBER;
pMsg->ulMsgLen = sizeof(STREAM_HANDLER_SPECIFIC_MESSAGE_CONTROL_BLOCK);
/*-----------------------------------------------------------------*/
/* Send a message to the source stream handler. */
/* */
/*-----------------------------------------------------------------*/
if (rc = SpiSendMsg(hStream, hidSource, ulMsgType, pMsg, return)
return (rc);