147b8f032b
of two. - drop the snd_solaris module, it's brojen and seemingly unmaintained by upstream. if the default oss output doesn't work, sdl should work ok. - regenerated PLIST brings in @bin marker ok, reminder jdixon@, claudio@ (MAINTAINER)
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
$OpenBSD: patch-src_snd_oss_c,v 1.3 2008/06/28 02:50:59 jakemsr Exp $
|
|
--- src/snd_oss.c.orig Sun Mar 14 18:25:43 2004
|
|
+++ src/snd_oss.c Thu May 29 23:49:13 2008
|
|
@@ -239,6 +239,15 @@ qboolean SNDDMA_Init(struct sndinfo * s) {
|
|
return 0;
|
|
}
|
|
|
|
+ int sel;
|
|
+ /* make sure we're using a power of two blocksize */
|
|
+ sel = 0x7fff000b; /* as many 2048 byte blocks as possible */
|
|
+ if (ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &sel)==-1)
|
|
+ {
|
|
+ perror("SETFRAGMENT");
|
|
+ si->Com_Printf("SNDDMA_Init: SETFRAGMENT ioctl failed.\n");
|
|
+ }
|
|
+
|
|
if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1)
|
|
{
|
|
perror("GETOSPACE");
|
|
@@ -358,7 +367,7 @@ qboolean SNDDMA_Init(struct sndinfo * s) {
|
|
|
|
if (!si->dma->buffer) {
|
|
si->dma->buffer = (unsigned char *) mmap(NULL, info.fragstotal * info.fragsize,
|
|
-#if defined(__FreeBSD__) && (__FreeBSD_version < 500000)
|
|
+#if defined(__FreeBSD__) && (__FreeBSD_version < 500000) || defined (__OpenBSD__)
|
|
PROT_READ|PROT_WRITE,
|
|
#else
|
|
PROT_WRITE,
|