$OpenBSD: patch-mpeglib_lib_util_audio_audioIO_Linux_cpp,v 1.2 2002/04/30 19:01:52 espie Exp $
--- mpeglib/lib/util/audio/audioIO_Linux.cpp.orig	Tue Jun  5 20:55:39 2001
+++ mpeglib/lib/util/audio/audioIO_Linux.cpp	Mon Apr 29 23:03:54 2002
@@ -39,11 +39,21 @@
 #undef AUSIZ
 #include <sys/soundcard.h>
 #else
+#if defined(HAVE_SOUNDCARD_H)
+#undef AUSIZ
+#include <soundcard.h>
+#else
 // fallback:
 #include <linux/soundcard.h>
 
 #endif
 #endif
+#endif
+#ifdef __OpenBSD__
+#define AUDIO_DEVICE_NAME "/dev/audio"
+#else
+#define AUDIO_DEVICE_NAME "/dev/dsp"
+#endif
 
 
 /* optimal fragment size */
@@ -75,7 +85,7 @@ void audioDestruct() {
    should open the audio device, perform any special initialization	
 */
 int  audioOpen() {
-  audio_fd = open ("/dev/dsp", O_WRONLY, 0);
+  audio_fd = open (AUDIO_DEVICE_NAME, O_WRONLY, 0);
   if (audio_fd < 0)  {
     perror("Unable to open the audio");
   }
