]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_bsd.c
Cleaned up alot more memory leaks. (still get 720 leaks just running demo1.dem)
[xonotic/darkplaces.git] / snd_bsd.c
index 5735013af33c26d885c4a5edb0c5df9400506ac7..0ca754f1711f3a0b595ba0cc86dfcdd03a0d3c11 100644 (file)
--- a/snd_bsd.c
+++ b/snd_bsd.c
@@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <unistd.h>
 
 #include "quakedef.h"
+#include "snd_main.h"
 
 
 static const int tryrates[] = {44100, 22050, 11025, 8000};
@@ -45,12 +46,17 @@ static qbyte writebuf [SND_BUFF_SIZE];
 qboolean SNDDMA_Init (void)
 {
        unsigned int i;
-       const char *snddev = _PATH_SOUND;
+       const char *snddev;
        audio_info_t info;
 
        memset ((void*)shm, 0, sizeof (*shm));
 
        // Open the audio device
+#ifdef _PATH_SOUND
+       snddev = _PATH_SOUND;
+#else
+       snddev = "/dev/sound";
+#endif
        audio_fd = open (snddev, O_WRONLY | O_NDELAY | O_NONBLOCK);
        if (audio_fd < 0)
        {