Lines Matching refs:FILE
60 unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device,
72 FILE *file;
84 fprintf(stderr, "Usage: %s file.wav [-D card] [-d device] [-c channels] "
89 file = fopen(argv[1], "wb");
90 if (!file) {
91 fprintf(stderr, "Unable to create file '%s'\n", argv[1]);
145 fseek(file, sizeof(struct wav_header), SEEK_SET);
149 frames = capture_sample(file, card, device, header.num_channels,
156 fseek(file, 0, SEEK_SET);
157 fwrite(&header, sizeof(struct wav_header), 1, file);
159 fclose(file);
164 unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device,
206 if (fwrite(buffer, 1, size, file) != size) {