Returns the size (in milliseconds) of the specified message.
DWORD vceGetMessageSize ( VCEHD vh, unsigned message, unsigned *msgsize)
|
Argument |
Description |
|
vh |
Handle of an open voice object. |
|
message |
Message number. |
|
msgsize |
Pointer to a returned message size (in milliseconds). |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_INVALID_HANDLE |
vh is not a valid handle to an open voice object. |
|
CTAERR_SVR_COMM |
Server communication error. |
|
VCEERR_INVALID_MESSAGE |
Invalid message number for file type. |
vceGetMessageSize returns the size (in milliseconds) of the voice message that the voice handle vh and message number message specify.
vceGetMessageSize returns SUCCESS for any message number that is valid for the file type of vh. Otherwise, the return code is VCEERR_INVALID_MESSAGE.
To convert the size into bytes, obtain the encoding format with vceGetOpenInfo and the frame size and frame duration with vceGetEncodingInfo. Convert using the following formula:
bytes = ( milliseconds / frametime ) * framesize
To obtain the total size of all messages in a voice object, use VCE_ALL_MESSAGES as the message number.
To obtain the size of the current message, use vceGetCurrentSize.
vceGetMessageSize does not affect the current message.
Refer to vceGetHighMessageNumber.