X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=snd_bsd.c;h=6c1bd6ee3583e01bede3ab2b73c3819272bdbe26;hb=4b9fb5c623dc4ebd8e10213af3edbcaea2e62fb7;hp=ce4c26d5241381dcd9794a268e312f94f2fb8df5;hpb=5d335e1ded7eadc25417f984a235d1067e5a174e;p=xonotic%2Fdarkplaces.git diff --git a/snd_bsd.c b/snd_bsd.c index ce4c26d5..6c1bd6ee 100644 --- 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 #include +#ifndef SUNOS #include +#endif #include #include +#ifndef SUNOS #include +#endif #include #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;