MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / update_sample_display

Function update_sample_display

fftools/ffplay.c:2354–2370  ·  view source on GitHub ↗

copy samples for viewing in editor window */

Source from the content-addressed store, hash-verified

2352
2353/* copy samples for viewing in editor window */
2354static void update_sample_display(VideoState *is, short *samples, int samples_size)
2355{
2356 int size, len;
2357
2358 size = samples_size / sizeof(short);
2359 while (size > 0) {
2360 len = SAMPLE_ARRAY_SIZE - is->sample_array_index;
2361 if (len > size)
2362 len = size;
2363 memcpy(is->sample_array + is->sample_array_index, samples, len * sizeof(short));
2364 samples += len;
2365 is->sample_array_index += len;
2366 if (is->sample_array_index >= SAMPLE_ARRAY_SIZE)
2367 is->sample_array_index = 0;
2368 size -= len;
2369 }
2370}
2371
2372/* return the wanted number of samples to get better sync if sync_type is video
2373 * or external master clock */

Callers 1

sdl_audio_callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected