The invention uses digital signal processing (DSP) techniques to synchronize
an audio encoding process with a video synchronization signal. Namely, the encoder
parameters of a DSP microchip are preset according to characteristics of an audio
frame. A buffer temporarily stores the audio frame prior to sending it to an encoder.
The buffer then transfers the frame in response to receiving a video synchronization
signal in conjunction with authorization from a microprocessor. As such, the encoding
sequence of the audio frame coincides with the video synchronization signal. Since
the corresponding video frame is already slaved to the video synchronization signal,
the audio samples are effectively processed in sequence with the video data. Prior
to outputting the encoded audio frame to a multiplexor, the encoder sends a value
to the microprocessor representing the difference between the end of the encoded
audio frame and a second video synchronization signal. Those audio samples are
ultimately discarded from the bitstream. Thus, synchronization is achieved by beginning
and effectively ending the encoding processes of both the audio and video data,
respectively, in sequence with a common video synchronization clock.