Intel IXP400 Car Stereo System User Manual


 
Intel
®
IXP400 Digital Signal Processing (DSP) Software Version 2.5
Resource-Specific Control Messages
34 API Reference Manual
6.11 Player Play-Completed Message
Format
typedef struct{
XMsgHdr_t head; /* message header */
XPlyMediaDesc_t mediaSeg[XMAX_PLY_SEG];
/* media segments to play */
UINT8 numSeg; /* number of segments */
} XMsgPlyStart_t;
where the media segment data structure is defined as
typedef struct{
INT32 offset; /* offset in byte where player starts */
INT32 length; /* length to play (in 10ms unit),
0 means playing till end of this segment*/
XMediaHandle_t handle; /* media storage handle */
INT16 next; /* the relative index of next segment followed,
XPLY_MEDIA_SEG_EOP means end-of-play
at this segment */
} XPlyMediaDesc_t;
Macro
#define XMSG_MAKE_PLY_START(pMsg, trans, inst, num)\
{\
XMSG_MAKE_HEAD(pMsg, trans, XMPR_PLY, inst,\
sizeof(XMsgPlyStart_t), XMSG_PLY_START, 0)\
((XMsgPlyStart_t *)(pMsg))->numSeg = num;\
}
#define XMSG_FIELD_PLY_START(pMsg, pMedia) \
{\
pMedia = ((XMsgPlyStart_t *)(pMsg))->mediaSeg;\
}
Response Player play-completed message (XMSG_PLY_CMPLT)
Type XMSG_PLY_CMPLT
Direction Outbound
Description Player indicates the completion of playing audio data.
Format
typedef struct{
XMsgHdr_t head; /* message header */
UINT16 reason; /* the reason of completion */
} XMsgPlyCmplt_t;
where the reason may be:
#define XMSG_STOP_REASON_USER 1
#define XMSG_STOP_REASON_EOD 2
Macro
#define XMSG_FIELD_PLY_CMPLT(pMsg, rsn)\
{\
rsn = ((XMsgPlyCmplt_t *)(pMsg))->reason;\
}
Type XMSG_PLY_START (Sheet 2 of 2)