blob: d05e65df07855367843e4fa84653cf267f0a0ea9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- unix/snd_unix.c.orig 2006-01-01 20:46:30.000000000 +0800
+++ unix/snd_unix.c 2013-09-05 13:28:24.000000000 +0800
@@ -59,7 +59,7 @@ qboolean SNDDMA_Init(void)
extern uid_t saved_euid;
if (snd_inited)
- return;
+ return 1;
if (!snddevice) {
sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
@@ -115,7 +115,7 @@ qboolean SNDDMA_Init(void)
if (dma.samplebits != 16 && dma.samplebits != 8)
{
ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &fmt);
- if (fmt & AFMT_S16_LE) dma.samplebits = 16;
+ if (fmt & AFMT_S16_NE) dma.samplebits = 16;
else if (fmt & AFMT_U8) dma.samplebits = 8;
}
@@ -157,7 +157,7 @@ qboolean SNDDMA_Init(void)
if (dma.samplebits == 16)
{
- rc = AFMT_S16_LE;
+ rc = AFMT_S16_NE;
rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc);
if (rc < 0)
{
|