]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_bsd.c
merged two sprite functions into the main callback to slightly clean up the code...
[xonotic/darkplaces.git] / snd_bsd.c
index ce4c26d5241381dcd9794a268e312f94f2fb8df5..6c1bd6ee3583e01bede3ab2b73c3819272bdbe26 100644 (file)
--- a/snd_bsd.c
+++ b/snd_bsd.c
@@ -20,14 +20,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <sys/param.h>
 #include <sys/audioio.h>
+#ifndef SUNOS
 #include <sys/endian.h>
+#endif
 #include <sys/ioctl.h>
 
 #include <fcntl.h>
+#ifndef SUNOS
 #include <paths.h>
+#endif
 #include <unistd.h>
 
 #include "quakedef.h"
+#include "snd_main.h"
 
 
 static const int tryrates[] = {44100, 22050, 11025, 8000};
@@ -54,7 +59,11 @@ qboolean SNDDMA_Init (void)
 #ifdef _PATH_SOUND
        snddev = _PATH_SOUND;
 #else
+#ifndef SUNOS
        snddev = "/dev/sound";
+#else
+       snddev = "/dev/audio";
+#endif
 #endif
        audio_fd = open (snddev, O_WRONLY | O_NDELAY | O_NONBLOCK);
        if (audio_fd < 0)
@@ -80,7 +89,11 @@ qboolean SNDDMA_Init (void)
 #if BYTE_ORDER == BIG_ENDIAN
                info.play.encoding = AUDIO_ENCODING_SLINEAR_BE;
 #else
+#ifndef SUNOS
                info.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
+#else
+               info.play.encoding = AUDIO_ENCODING_LINEAR;
+#endif
 #endif
                if (ioctl (audio_fd, AUDIO_SETINFO, &info) == 0)
                        break;