mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
36 lines
756 B
Plaintext
36 lines
756 B
Plaintext
--- audioIO_Linux.c.orig Mon Nov 2 22:20:38 1998
|
|
+++ audioIO_Linux.c Mon Nov 2 22:22:38 1998
|
|
@@ -26,7 +26,9 @@
|
|
|
|
/* optimal fragment size */
|
|
|
|
+#ifndef OS_BSD
|
|
int AUSIZ = 0;
|
|
+#endif
|
|
|
|
/* declare these static to effectively isolate the audio device */
|
|
|
|
@@ -42,6 +44,9 @@
|
|
void
|
|
audioOpen(int frequency, int stereo, int volume)
|
|
{
|
|
+#ifdef OS_BSD
|
|
+ int temp;
|
|
+#endif
|
|
int supportedMixers, play_format=AFMT_S16_LE;
|
|
|
|
if ((audio_fd = open ("/dev/dsp", O_WRONLY, 0)) == -1)
|
|
@@ -78,7 +83,12 @@
|
|
if (volume != -1)
|
|
audioSetVolume(volume);
|
|
|
|
+#ifdef OS_BSD
|
|
+ temp = AUSIZ;
|
|
+ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &temp) == -1)
|
|
+#else
|
|
if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1)
|
|
+#endif
|
|
die("Unable to get fragment size\n");
|
|
}
|
|
|