copy samples for viewing in editor window */
| 2352 | |
| 2353 | /* copy samples for viewing in editor window */ |
| 2354 | static 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 */ |
no outgoing calls
no test coverage detected