Lines Matching full:frames
6 static size_t read_frames(void **frames) in read_frames() argument
36 *frames = malloc(frame_size * frames_per_sec); in read_frames()
37 if (*frames == NULL) { in read_frames()
38 fprintf(stderr, "failed to allocate frames\n"); in read_frames()
43 int read_count = pcm_readi(pcm, *frames, frames_per_sec); in read_frames()
52 static int write_file(const void *frames, size_t size) in write_file() argument
59 fwrite(frames, 1, size, output_file); in write_file()
66 void *frames = NULL; in main() local
69 size = read_frames(&frames); in main()
74 if (write_file(frames, size) < 0) { in main()
75 free(frames); in main()
79 free(frames); in main()