$OpenBSD: patch-libavformat_audio_c,v 1.2 2004/10/13 01:38:21 jolan Exp $
--- libavformat/audio.c.orig	Fri Jun 18 20:59:34 2004
+++ libavformat/audio.c	Wed Oct  6 22:27:57 2004
@@ -21,7 +21,12 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#if defined(__OpenBSD__)
+#include <soundcard.h>
+#include <sys/audioio.h>
+#else
 #include <sys/soundcard.h>
+#endif
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -43,13 +48,16 @@ typedef struct {
 
 static int audio_open(AudioData *s, int is_output, const char *audio_device)
 {
+#ifdef __OpenBSD__
+    audio_info_t audio_if;
+#endif
     int audio_fd;
     int tmp, err;
     char *flip = getenv("AUDIO_FLIP_LEFT");
 
     /* open linux audio device */
     if (!audio_device)
-        audio_device = "/dev/dsp";
+        audio_device = "/dev/audio";
 
     if (is_output)
         audio_fd = open(audio_device, O_WRONLY);
@@ -133,6 +141,22 @@ static int audio_open(AudioData *s, int 
     }
     s->sample_rate = tmp; /* store real sample rate */
     s->fd = audio_fd;
+
+#ifdef __OpenBSD__
+    AUDIO_INITINFO(&audio_if);
+    if (is_output) {
+        audio_if.play.pause = 0;
+        audio_if.record.pause = 1;
+    } else {
+        audio_if.play.pause = 1;
+        audio_if.record.pause = 0;
+    }
+    err = ioctl(audio_fd, AUDIO_SETINFO, &audio_if);
+    if (err < 0) {
+        perror("AUDIO_SETINFO");
+        goto fail;
+    }
+#endif
 
     return 0;
  fail:
