arduino-audio-tools
|
Logic to Synchronize video and audio output: we use a buffer to store the audio and instead of delaying the frames with delay() we play audio. The bufferSize defines the audio buffer in bytes. The correctionMs is used to slow down or speed up the playback of the video to prevent any audio buffer underflows. More...
#include <Video.h>
Public Member Functions | |
VideoAudioBufferedSync (int bufferSize, int correctionMs) | |
void | delayVideoFrame (int32_t microsecondsPerFrame, uint32_t time_used_ms) |
void | writeAudio (Print *out, uint8_t *data, size_t size) |
Process the audio data. | |
Protected Attributes | |
int | correction_ms = 0 |
Print * | p_out = nullptr |
RingBuffer< uint8_t > | ring_buffer {0} |
Logic to Synchronize video and audio output: we use a buffer to store the audio and instead of delaying the frames with delay() we play audio. The bufferSize defines the audio buffer in bytes. The correctionMs is used to slow down or speed up the playback of the video to prevent any audio buffer underflows.
|
inlinevirtual |
Adds a delay after playing a frame to process with the correct frame rate. If the playing is too slow we return the mod to select the frames
Reimplemented from VideoAudioSync.