aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-15 22:18:13 -0700
committerChris Robinson <[email protected]>2009-09-15 22:18:13 -0700
commit49648fe22dec8fb5a783d8a7e3929b3231f6f4f4 (patch)
tree91476b2a2a76072128fe586400577fadfc179080 /Alc/alsa.c
parent9f037e89802a7b4fc6c287bab97b85050bbd6721 (diff)
Make a GetConfigValueBool function and use it
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index aad0835a..ec80973a 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -417,7 +417,6 @@ static ALCboolean alsa_start_context(ALCdevice *device, ALCcontext *context)
snd_pcm_access_t access;
unsigned int periods;
unsigned int rate;
- const char *str;
int allowmmap;
char *err;
int i;
@@ -440,16 +439,11 @@ static ALCboolean alsa_start_context(ALCdevice *device, ALCcontext *context)
AL_PRINT("Unknown format?! %x\n", device->Format);
}
+ allowmmap = GetConfigValueBool("alsa", "mmap", 1);
periods = GetConfigValueInt("alsa", "periods", 0);
bufferSizeInFrames = device->BufferSize;
rate = device->Frequency;
- str = GetConfigValue("alsa", "mmap", "true");
- allowmmap = (strcasecmp(str, "true") == 0 ||
- strcasecmp(str, "yes") == 0 ||
- strcasecmp(str, "on") == 0 ||
- atoi(str) != 0);
-
err = NULL;
psnd_pcm_hw_params_malloc(&p);