AUDIO_GETBUFINFO is more efficient for this purpose.

This commit is contained in:
isaki 2019-08-24 06:16:27 +00:00
parent 04ea388fd4
commit 0c69e485a6
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: audiodev.c,v 1.12 2019/08/24 06:00:49 isaki Exp $ */
/* $NetBSD: audiodev.c,v 1.13 2019/08/24 06:16:27 isaki Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill@invisible.ca>
@ -317,8 +317,8 @@ audiodev_test(struct audiodev *adev)
warn("ioctl AUDIO_SETINFO");
goto done;
}
if (ioctl(adev->fd, AUDIO_GETINFO, &info) == -1) {
warn("ioctl AUDIO_GETINFO");
if (ioctl(adev->fd, AUDIO_GETBUFINFO, &info) == -1) {
warn("ioctl AUDIO_GETBUFINFO");
goto done;
}