ohdr
if ((ihdr == ohdr) &&
AudioHdr ohdr;
ohdr = ofp->GetHeader();
while (((ihdr != ohdr) || (bufs != 1)) && !err) {
if (IS_MONO(ohdr)) {
ohdr.encoding, ohdr.bytes_per_unit,
if (RATE_CONV(ihdr, ohdr) ||
(ENC_CONV(ihdr, ohdr) &&
(!IS_PCM(ihdr) || !IS_PCM(ohdr)))) {
if (RATE_CONV(ihdr, ohdr)) {
ohdr.encoding, ohdr.bytes_per_unit,
ohdr.sample_rate, bufs);
if (ENC_CONV(ihdr, ohdr)) {
ohdr.encoding, ohdr.bytes_per_unit,
} else if (IS_PCM(ohdr)) {
ohdr.encoding, ohdr.bytes_per_unit,
ohdr.encoding, ohdr.bytes_per_unit,
if (!IS_MONO(ohdr)) {
ihdr, ohdr.channels, bufs);
AudioHdr ohdr;
AudioHdr ohdr)
ohdr = ofp->GetHeader();
msg1 = ohdr.FormatString();
if ((ohdr.sample_rate < 8000) || (ohdr.sample_rate > 48000)) {
msg1 = ohdr.RateString();
if (ohdr.channels > 2) {
msg1 = ohdr.ChannelString();
msg2 = ohdr.FormatString();
if (cvtlen > ohdr.Bytes_to_Time(CVTMAXBUF * 4))
cvtlen = ohdr.Bytes_to_Time(CVTMAXBUF * 4);
((ohdr.encoding != ULAW) &&
(ohdr.encoding != ALAW) &&
(ohdr.encoding != LINEAR) &&
(ohdr.encoding != FLOAT) &&
(ohdr.encoding != G721) &&
(ohdr.encoding != G723))) {
enc2 = ohdr.EncodingString();
AudioHdr ohdr,
(unsigned char *)&fhdr, &file_type, &ohdr,
const AudioHdr ohdr,
(FileAccess)WriteOnly, ohdr,
ohdr, path))) {
if ((err = ofp->SetHeader(ohdr)) != AUDIO_SUCCESS) {
Audio_hdr ohdr; // ignore this ...
init_header(ohdr);
(void) parse_format((char *)"pcm", ohdr, ofmt, o_offset);
(void) parse_format((char *)"ulaw", ohdr, ofmt, o_offset);
(void) parse_format((char *)"g721", ohdr, ofmt, o_offset);
(void) parse_format((char *)"ulaw", ohdr, ofmt, o_offset);
(void) parse_format((char *)"ulaw", ohdr, ofmt, o_offset);
if (parse_format(out_fmt, ohdr, ofmt, o_offset) == -1)
ohdr = ifp->GetHeader();
ohdr = ifp->GetHeader();
if (parse_format(out_fmt, ohdr, ofmt, o_offset)
if (verify_conversion(ifp->GetHeader(), ohdr) == -1) {
ofp = create_output_file(outfile, ohdr, ofmt,
ohdr = ifp->GetHeader();
if (parse_format(out_fmt, ohdr, ofmt, o_offset)
if (verify_conversion(ifp->GetHeader(), ohdr) == -1) {
if (noop_conversion(ifp->GetHeader(), ohdr,
ofp = create_output_file(outfile, ohdr, ofmt,
if (!pflag && (verify_conversion(ifp->GetHeader(), ohdr)
AudioHdr ohdr;
&file_type, &ohdr, &infosize);
hdr_local.sample_rate = ohdr.sample_rate;
hdr_local.samples_per_unit = ohdr.samples_per_unit;
hdr_local.bytes_per_unit = ohdr.bytes_per_unit;
hdr_local.channels = ohdr.channels;
hdr_local.encoding = (AudioEncoding) ohdr.encoding;
if ((ohdr.data_size != AUDIO_UNKNOWN_SIZE) &&
(GetLength() != GetHeader().Bytes_to_Time(ohdr.data_size)))
Audio_hdr ohdr; // XXX - old libaudio hdr
ohdr.sample_rate = hdr_local.sample_rate;
ohdr.samples_per_unit = hdr_local.samples_per_unit;
ohdr.bytes_per_unit = hdr_local.bytes_per_unit;
ohdr.channels = hdr_local.channels;
ohdr.encoding = hdr_local.encoding;
ohdr.data_size = AUDIO_UNKNOWN_SIZE;
ohdr.data_size = (uint_t)GetHeader().Time_to_Bytes(GetLength());
err = (AudioError) audio_write_filehdr(getfd(), &ohdr, FILE_AU,
Audio_hdr ohdr; // XXX - old libaudio hdr
convert_old((struct ohdr *)hdrp);
static void convert_old(struct ohdr *);
convert_old(struct ohdr *ohdrp)
struct hdr ihdr, ohdr;
memset(&ohdr, 0, sizeof(ohdr));
ohdr.fmt = format;
ohdr.text = ldr_size;
ohdr.data = btx.btx_textsz + ihdr.size;
ohdr.org = lentry;
ohdr.entry = lentry;
puthdr(fdo, &ohdr);
seekx(fdo, ohdr.size += ohdr.text);
if (ftruncate(fdo, ohdr.size += ohdr.data))
printf(oinfo, fmtlist[ohdr.fmt], ohdr.size, ohdr.text,
ohdr.data, ohdr.org, ohdr.entry);