$NetBSD: patch-ac,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ --- QtAMP.cpp Wed Feb 11 17:53:35 1998 +++ QtAMP.cpp Wed Jul 29 22:21:08 1998 @@ -24,10 +24,9 @@ #include #include -#include #include #include -#include +#include #include #include #include @@ -84,11 +84,11 @@ splash->show(); // init mixer -#ifdef OS_Linux +#if defined(OS_Linux) || defined(OS_NetBSD) if ((mixer = open("/dev/mixer", O_RDWR)) < 0) die("Error opening /dev/mixer, exiting\n"); ioctl(mixer, SOUND_MIXER_READ_PCM, &v); -#endif OS_Linux +#endif /* where mine resource file is located */ char home[500]; @@ -262,7 +262,7 @@ QtAMP::~QtAMP() { -#ifdef OS_Linux +#if defined(OS_Linux) || defined(OS_NetBSD) close(mixer); #endif real_quit(); @@ -348,7 +348,7 @@ sprintf(volum,"Volume: %d",vr); playLabel->setText( volum ); // printf("%d %d\n",tvr,tv); -#ifdef OS_Linux +#if defined(OS_Linux) || defined(OS_NetBSD) int x = (tv*256 + tvl); ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); #endif @@ -884,14 +884,14 @@ { if (mute == 1) { -#ifdef OS_Linux +#if defined(OS_Linux) || defined(OS_NetBSD) int x = (tv*256 + tvl); ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); #endif } if (mute == 0) { -#ifdef OS_Linux +#if defined(OS_Linux) || defined(OS_NetBSD) int x = (7*256 + 7); ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); #endif