$NetBSD: patch-bb,v 1.4 2006/01/13 00:13:54 joerg Exp $ --- src_sound/dsp_mixxer.c.orig 1998-06-22 05:41:31.000000000 -0500 +++ src_sound/dsp_mixxer.c @@ -19,10 +19,10 @@ #include #include #include -#ifdef Linux +#if defined(Linux) || defined( FreeBSD) || defined(__DragonFly__) #include -#elif FreeBSD - #include +#elif defined(__NetBSD__) + #include #endif #include "funktracker_defs.h" #include "funktracker.h" @@ -91,7 +91,7 @@ void init_dsp_buffers(void) register int x; calc_mix_buffer(funk_info.bpm_rate); - ioctl(dsp_fp,SNDCTL_DSP_RESET); + ioctl(dsp_fp,SNDCTL_DSP_RESET, 0); for(x = 0;x < mix_buffer_size;x++) { *(left_mix_buffer + x) = 0; @@ -187,7 +187,7 @@ void close_dsp(void) { if(dsp_fp != -1) { - ioctl(dsp_fp,SNDCTL_DSP_RESET); + ioctl(dsp_fp,SNDCTL_DSP_RESET, 0); close(dsp_fp); } } @@ -247,12 +247,12 @@ int open_dsp(int srate,int prec,int st) if(dsp_alloc_bufs()) { printf("Allocated dsp buffers..\n"); - dsp_fp = open("/dev/dsp",O_WRONLY,0); + dsp_fp = open(DEVOSSAUDIO,O_WRONLY,0); if(dsp_fp != -1) { int frag; - printf("Opened /dev/dsp: %d bit %s, %d Hz (%d frames @ %d bytes)\n", + printf("Opened " DEVOSSAUDIO ": %d bit %s, %d Hz (%d frames @ %d bytes)\n", funk_info.precision, funk_info.stereo == 8 ? "mono" : "stereo", funk_info.sampling_rate, @@ -265,7 +265,7 @@ int open_dsp(int srate,int prec,int st) return 1; } else - printf("Error: Couldn't open /dev/dsp. Program aborted.\n"); + printf("Error: Couldn't open " DEVOSSAUDIO". Program aborted.\n"); dsp_dealloc_bufs(); } else