Home | History | Annotate | Download | only in ossaudio

Lines Matching defs:tmpinfo

179 	struct audio_info tmpinfo, hwfmt;
224 AUDIO_INITINFO(&tmpinfo);
231 tmpinfo.play.sample_rate =
232 tmpinfo.record.sample_rate = idat;
245 if (ioctlf(fp, AUDIO_SETINFO, &tmpinfo) != 0) {
252 error = ioctlf(fp, AUDIO_GETINFO, &tmpinfo);
258 tmpinfo.play.sample_rate =
259 tmpinfo.record.sample_rate =
260 (tmpinfo.mode == AUMODE_RECORD) ?
263 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
272 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
278 idat = GETPRINFO(&tmpinfo, sample_rate);
288 AUDIO_INITINFO(&tmpinfo);
295 tmpinfo.play.channels =
296 tmpinfo.record.channels = idat ? 2 : 1;
297 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
303 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
309 idat = GETPRINFO(&tmpinfo, channels) - 1;
318 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
324 setblocksize(fp, &tmpinfo);
325 idat = tmpinfo.blocksize;
336 AUDIO_INITINFO(&tmpinfo);
345 tmpinfo.play.precision =
346 tmpinfo.record.precision = 8;
347 tmpinfo.play.encoding =
348 tmpinfo.record.encoding = AUDIO_ENCODING_ULAW;
351 tmpinfo.play.precision =
352 tmpinfo.record.precision = 8;
353 tmpinfo.play.encoding =
354 tmpinfo.record.encoding = AUDIO_ENCODING_ALAW;
357 tmpinfo.play.precision =
358 tmpinfo.record.precision = 8;
359 tmpinfo.play.encoding =
360 tmpinfo.record.encoding = AUDIO_ENCODING_ULINEAR;
363 tmpinfo.play.precision =
364 tmpinfo.record.precision = 8;
365 tmpinfo.play.encoding =
366 tmpinfo.record.encoding = AUDIO_ENCODING_SLINEAR;
369 tmpinfo.play.precision =
370 tmpinfo.record.precision = 16;
371 tmpinfo.play.encoding =
372 tmpinfo.record.encoding = AUDIO_ENCODING_SLINEAR_LE;
375 tmpinfo.play.precision =
376 tmpinfo.record.precision = 16;
377 tmpinfo.play.encoding =
378 tmpinfo.record.encoding = AUDIO_ENCODING_SLINEAR_BE;
381 tmpinfo.play.precision =
382 tmpinfo.record.precision = 16;
383 tmpinfo.play.encoding =
384 tmpinfo.record.encoding = AUDIO_ENCODING_ULINEAR_LE;
387 tmpinfo.play.precision =
388 tmpinfo.record.precision = 16;
389 tmpinfo.play.encoding =
390 tmpinfo.record.encoding = AUDIO_ENCODING_ULINEAR_BE;
393 tmpinfo.play.precision =
394 tmpinfo.record.precision = 16;
395 tmpinfo.play.encoding =
396 tmpinfo.record.encoding = AUDIO_ENCODING_AC3;
407 tmpinfo.play.precision =
408 tmpinfo.record.precision = 16;
409 tmpinfo.play.encoding =
410 tmpinfo.record.encoding = AUDIO_ENCODING_SLINEAR_LE;
415 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
423 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
429 encoding = GETPRINFO(&tmpinfo, encoding);
430 precision = GETPRINFO(&tmpinfo, precision);
470 __func__, tmpinfo.play.encoding));
484 AUDIO_INITINFO(&tmpinfo);
491 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
497 setchannels(fp, tmpinfo.mode, idat);
500 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
506 idat = GETPRINFO(&tmpinfo, channels);
528 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
534 setblocksize(fp, &tmpinfo);
536 idat = tmpinfo.play.buffer_size / tmpinfo.blocksize;
537 idat = (tmpinfo.play.buffer_size / idat) & -4;
538 AUDIO_INITINFO(&tmpinfo);
539 tmpinfo.blocksize = idat;
540 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
546 idat = tmpinfo.play.buffer_size / tmpinfo.blocksize;
555 AUDIO_INITINFO(&tmpinfo);
568 tmpinfo.blocksize = 1 << (idat & 0xffff);
569 tmpinfo.hiwat = (idat >> 16) & 0x7fff;
571 "hiwat=%d\n", __func__, tmpinfo.blocksize, tmpinfo.hiwat));
572 if (tmpinfo.hiwat == 0) /* 0 means set to max */
573 tmpinfo.hiwat = 65536;
574 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
580 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
586 u = tmpinfo.blocksize;
589 idat |= (tmpinfo.hiwat & 0x7fff) << 16;
660 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
666 setblocksize(fp, &tmpinfo);
668 bufinfo.fragsize = tmpinfo.blocksize;
669 bufinfo.fragments = tmpinfo.hiwat -
670 (tmpinfo.play.seek + tmpinfo.blocksize - 1) /
671 tmpinfo.blocksize;
672 bufinfo.fragstotal = tmpinfo.hiwat;
674 tmpinfo.hiwat * tmpinfo.blocksize - tmpinfo.play.seek;
683 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
689 setblocksize(fp, &tmpinfo);
691 bufinfo.fragsize = tmpinfo.blocksize;
692 bufinfo.fragments = tmpinfo.record.seek / tmpinfo.blocksize;
694 tmpinfo.record.buffer_size / tmpinfo.blocksize;
695 bufinfo.bytes = tmpinfo.record.seek;
742 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
748 AUDIO_INITINFO(&tmpinfo);
749 if (tmpinfo.mode & AUMODE_PLAY)
750 tmpinfo.play.pause = (idat & OSS_PCM_ENABLE_OUTPUT) == 0;
751 if (tmpinfo.mode & AUMODE_RECORD)
752 tmpinfo.record.pause = (idat & OSS_PCM_ENABLE_INPUT) == 0;
753 (void)ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
756 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
763 if ((tmpinfo.mode & AUMODE_PLAY) && !tmpinfo.play.pause)
765 if ((tmpinfo.mode & AUMODE_RECORD) && !tmpinfo.record.pause)
835 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
841 idat = tmpinfo.play.seek + tmpinfo.blocksize / 2;
1537 struct audio_info tmpinfo, hwfmt;
1547 AUDIO_INITINFO(&tmpinfo);
1548 tmpinfo.play.channels = nchannels;
1549 if (ioctlf(fp, AUDIO_SETINFO, &tmpinfo) < 0) {
1550 AUDIO_INITINFO(&tmpinfo);
1551 tmpinfo.play.channels = hwfmt.play.channels;
1552 (void)ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
1557 AUDIO_INITINFO(&tmpinfo);
1558 tmpinfo.record.channels = nchannels;
1559 if (ioctlf(fp, AUDIO_SETINFO, &tmpinfo) < 0) {
1560 AUDIO_INITINFO(&tmpinfo);
1561 tmpinfo.record.channels = hwfmt.record.channels;
1562 (void)ioctlf(fp, AUDIO_SETINFO, &tmpinfo);