=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/audioctl/audioctl.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/audioctl/audioctl.c 2015/05/16 12:51:24 1.27 --- src/usr.bin/audioctl/audioctl.c 2015/05/26 18:17:12 1.28 *************** *** 1,4 **** ! /* $OpenBSD: audioctl.c,v 1.27 2015/05/16 12:51:24 ratchov Exp $ */ /* $NetBSD: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: audioctl.c,v 1.28 2015/05/26 18:17:12 ratchov Exp $ */ /* $NetBSD: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ /* *************** *** 61,66 **** --- 61,68 ---- int properties, fullduplex, perrors, rerrors; + struct audio_offset poffs, roffs; + struct field { const char *name; void *valp; *************** *** 92,101 **** { "play.bps", &info.play.bps, UINT, 0 }, { "play.msb", &info.play.msb, UINT, 0 }, { "play.encoding", &info.play.encoding, ENC, 0 }, - { "play.samples", &info.play.samples, UINT, READONLY }, { "play.pause", &info.play.pause, UCHAR, 0 }, { "play.active", &info.play.active, UCHAR, READONLY }, { "play.block_size", &info.play.block_size, UINT, 0 }, { "play.errors", &perrors, INT, READONLY }, { "record.rate", &info.record.sample_rate,UINT, 0 }, { "record.sample_rate", &info.record.sample_rate,UINT, ALIAS }, --- 94,103 ---- { "play.bps", &info.play.bps, UINT, 0 }, { "play.msb", &info.play.msb, UINT, 0 }, { "play.encoding", &info.play.encoding, ENC, 0 }, { "play.pause", &info.play.pause, UCHAR, 0 }, { "play.active", &info.play.active, UCHAR, READONLY }, { "play.block_size", &info.play.block_size, UINT, 0 }, + { "play.bytes", &poffs.samples, INT, READONLY }, { "play.errors", &perrors, INT, READONLY }, { "record.rate", &info.record.sample_rate,UINT, 0 }, { "record.sample_rate", &info.record.sample_rate,UINT, ALIAS }, *************** *** 104,113 **** { "record.bps", &info.record.bps, UINT, 0 }, { "record.msb", &info.record.msb, UINT, 0 }, { "record.encoding", &info.record.encoding, ENC, 0 }, - { "record.samples", &info.record.samples, UINT, READONLY }, { "record.pause", &info.record.pause, UCHAR, 0 }, { "record.active", &info.record.active, UCHAR, READONLY }, { "record.block_size", &info.record.block_size,UINT, 0 }, { "record.errors", &rerrors, INT, READONLY }, { 0 } }; --- 106,115 ---- { "record.bps", &info.record.bps, UINT, 0 }, { "record.msb", &info.record.msb, UINT, 0 }, { "record.encoding", &info.record.encoding, ENC, 0 }, { "record.pause", &info.record.pause, UCHAR, 0 }, { "record.active", &info.record.active, UCHAR, READONLY }, { "record.block_size", &info.record.block_size,UINT, 0 }, + { "record.bytes", &roffs.samples, INT, READONLY }, { "record.errors", &rerrors, INT, READONLY }, { 0 } }; *************** *** 299,304 **** --- 301,310 ---- err(1, "AUDIO_PERROR"); if (ioctl(fd, AUDIO_RERROR, &rerrors) < 0) err(1, "AUDIO_RERROR"); + if (ioctl(fd, AUDIO_GETOOFFS, &poffs) < 0) + err(1, "AUDIO_GETOOFFS"); + if (ioctl(fd, AUDIO_GETIOFFS, &roffs) < 0) + err(1, "AUDIO_GETOIFFS"); if (ioctl(fd, AUDIO_GETINFO, &info) < 0) err(1, "AUDIO_GETINFO"); }