Sets the skew correction time for an audio stream relative to the video stream.
DWORD mmSetSkewCorrection ( MMFile *pMMFile, int skewCorrection)
Argument |
Description |
||||||
pMMFile |
A pointer to the object that controls the multimedia file. |
||||||
skewCorrection |
Skew correction time for an audio (AMR) stream during a 3GP file record. The effect of a skew correction is based on the fact that AMR frames are 20 ms duration:
Valid values are -4095 to 4095 ms. |
Return value |
Description |
SUCCESS |
|
MMERR_INVALID_SKEW_TIME |
Skew time is not -4095 to 4095 ms. |
Use mmSetSkewCorrection to synchronize the audio and video streams. The skew correction operation is allowed only during the record of a 3GP file. Call mmSetSkewCorrection before the first call to mmWriteStream for the audio stream.
DWORD ret;
int skewCorrection = 20; /* Set skew correction to 20 ms */
ret = mmSetSkewCorrection( &mmfile, skewCorrection);
if (ret != SUCCESS)
{
printf("\nERROR: failed to set the skew correction time ... ret (%d)\n", ret);
}