comparison audio.c @ 754:aa52767bb802 libavformat

OpenBSD support patch by (Jacob Meuser // jakemsr jakemsr com)
author michael
date Mon, 09 May 2005 13:24:23 +0000
parents 0fdc96c2f2fe
children feca73904e67
comparison
equal deleted inserted replaced
753:1fc7b1637f90 754:aa52767bb802
19 #include "avformat.h" 19 #include "avformat.h"
20 20
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <stdio.h> 22 #include <stdio.h>
23 #include <string.h> 23 #include <string.h>
24 #ifdef __OpenBSD__
25 #include <soundcard.h>
26 #else
24 #include <sys/soundcard.h> 27 #include <sys/soundcard.h>
28 #endif
25 #include <unistd.h> 29 #include <unistd.h>
26 #include <fcntl.h> 30 #include <fcntl.h>
27 #include <sys/ioctl.h> 31 #include <sys/ioctl.h>
28 #include <sys/mman.h> 32 #include <sys/mman.h>
29 #include <sys/time.h> 33 #include <sys/time.h>
47 int tmp, err; 51 int tmp, err;
48 char *flip = getenv("AUDIO_FLIP_LEFT"); 52 char *flip = getenv("AUDIO_FLIP_LEFT");
49 53
50 /* open linux audio device */ 54 /* open linux audio device */
51 if (!audio_device) 55 if (!audio_device)
56 #ifdef __OpenBSD__
57 audio_device = "/dev/sound";
58 #else
52 audio_device = "/dev/dsp"; 59 audio_device = "/dev/dsp";
60 #endif
53 61
54 if (is_output) 62 if (is_output)
55 audio_fd = open(audio_device, O_WRONLY); 63 audio_fd = open(audio_device, O_WRONLY);
56 else 64 else
57 audio_fd = open(audio_device, O_RDONLY); 65 audio_fd = open(audio_device, O_RDONLY);