Lines Matching refs:hdr

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