Lines Matching refs:hdr
45 static struct wav_header hdr;
267 hdr.data_sz = 0;
335 hdr.data_sz += bufsize;
336 hdr.riff_sz = hdr.data_sz + 44 - 8;
339 write(fd, &hdr, sizeof(hdr));
365 hdr.data_sz += bufsize;
366 hdr.riff_sz = hdr.data_sz + 44 - 8;
369 write(fd, &hdr, sizeof(hdr));
380 return hdr.data_sz;
442 memset(&hdr, 0, sizeof(struct wav_header));
443 hdr.riff_id = ID_RIFF;
444 hdr.riff_fmt = ID_WAVE;
445 hdr.fmt_id = ID_FMT;
446 hdr.fmt_sz = 16;
447 hdr.audio_format = FORMAT_PCM;
448 hdr.num_channels = ch;
449 hdr.sample_rate = rate;
450 hdr.bits_per_sample = 16;
451 hdr.byte_rate = (rate * ch * hdr.bits_per_sample) / 8;
452 hdr.block_align = ( hdr.bits_per_sample * ch ) / 8;
453 hdr.data_id = ID_DATA;
454 hdr.data_sz = 0;
462 hdr.riff_sz = hdr.data_sz + 44 - 8;
463 if (write(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) {
470 hdr.num_channels, hdr.sample_rate, hdr.bits_per_sample,
471 hdr.audio_format == FORMAT_PCM ? "PCM" : "unknown");
473 hdr.sample_rate = rate;
474 hdr.num_channels = ch;
482 return record_file(hdr.sample_rate, hdr.num_channels, fd, count, flag, device);
492 hdr.riff_sz = hdr.data_sz + 44 - 8;
493 fprintf(stderr, "Arec: hdr.data_sz =%d\n", hdr.data_sz);
494 fprintf(stderr, "Arec: hdr.riff_sz =%d\n", hdr.riff_sz);
495 if (write(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) {