pkgsrc/audio/alsa-plugins-oss/patches/patch-ac
jmcneill 78110d1320 Import alsa-plugins-oss version 1.0.18.
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
functionality to the Linux operating system. ALSA has the following
significant features:

    * Efficient support for all types of audio interfaces, from consumer sound
      cards to professional multichannel audio interfaces.
    * Fully modularized sound drivers.
    * SMP and thread-safe design.
    * User space library (alsa-lib) to simplify application programming and
      provide higher level functionality.
    * Support for the older Open Sound System (OSS) API, providing binary
      compatibility for most OSS programs.

This package provides an OSS plugin for ALSA.
2008-12-19 04:03:22 +00:00

43 lines
1.1 KiB
Text

$NetBSD: patch-ac,v 1.1.1.1 2008/12/19 04:03:22 jmcneill Exp $
--- oss/pcm_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
+++ oss/pcm_oss.c
@@ -22,7 +22,11 @@
#include <sys/ioctl.h>
#include <alsa/asoundlib.h>
#include <alsa/pcm_external.h>
+#ifdef __linux__
#include <linux/soundcard.h>
+#else
+#include <sys/soundcard.h>
+#endif
typedef struct snd_pcm_oss {
snd_pcm_ioplug_t io;
@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *i
snd_pcm_oss_t *oss = io->private_data;
if (io->stream == SND_PCM_STREAM_PLAYBACK)
- ioctl(oss->fd, SNDCTL_DSP_SYNC);
+ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
return 0;
}
@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t
snd_pcm_oss_t *oss = io->private_data;
int tmp;
- ioctl(oss->fd, SNDCTL_DSP_RESET);
+ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
tmp = io->channels;
if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
@@ -355,7 +359,7 @@ static snd_pcm_ioplug_callback_t oss_cap
SND_PCM_PLUGIN_DEFINE_FUNC(oss)
{
snd_config_iterator_t i, next;
- const char *device = "/dev/dsp";
+ const char *device = DEVOSSAUDIO;
int err;
snd_pcm_oss_t *oss;