aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/qsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-09-08 15:29:07 -0700
committerChris Robinson <[email protected]>2014-09-08 15:29:07 -0700
commit4a712dc61271b35ca3be85177eba71e939ac6eee (patch)
tree989e7deb9dc97e15dc30d9a2906046050786f6db /Alc/backends/qsa.c
parent7a31847f7d116857bbd377898a1389bd05ca4291 (diff)
Remove some unnecessary config options
Diffstat (limited to 'Alc/backends/qsa.c')
-rw-r--r--Alc/backends/qsa.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/Alc/backends/qsa.c b/Alc/backends/qsa.c
index fac07cef..89b67ddf 100644
--- a/Alc/backends/qsa.c
+++ b/Alc/backends/qsa.c
@@ -255,22 +255,16 @@ FORCE_ALIGN static int qsa_proc_playback(void* ptr)
static ALCenum qsa_open_playback(ALCdevice* device, const ALCchar* deviceName)
{
- qsa_data* data;
- char driver[64];
- int status;
+ qsa_data *data;
int card, dev;
+ int status;
- strncpy(driver, GetConfigValue("qsa", "device", qsaDevice), sizeof(driver)-1);
- driver[sizeof(driver)-1]=0;
-
- data=(qsa_data*)calloc(1, sizeof(qsa_data));
- if (data==NULL)
- {
+ data = (qsa_data*)calloc(1, sizeof(qsa_data));
+ if(data == NULL)
return ALC_OUT_OF_MEMORY;
- }
if(!deviceName)
- deviceName = driver;
+ deviceName = qsaDevice;
if(strcmp(deviceName, qsaDevice) == 0)
status = snd_pcm_open_preferred(&data->pcmHandle, &card, &dev, SND_PCM_OPEN_PLAYBACK);
@@ -605,15 +599,11 @@ static void qsa_stop_playback(ALCdevice* device)
static ALCenum qsa_open_capture(ALCdevice* device, const ALCchar* deviceName)
{
- qsa_data* data;
- int format=-1;
- char driver[64];
+ qsa_data *data;
int card, dev;
+ int format=-1;
int status;
- strncpy(driver, GetConfigValue("qsa", "capture", qsaDevice), sizeof(driver)-1);
- driver[sizeof(driver)-1]=0;
-
data=(qsa_data*)calloc(1, sizeof(qsa_data));
if (data==NULL)
{
@@ -621,7 +611,7 @@ static ALCenum qsa_open_capture(ALCdevice* device, const ALCchar* deviceName)
}
if(!deviceName)
- deviceName=driver;
+ deviceName = qsaDevice;
if(strcmp(deviceName, qsaDevice) == 0)
status = snd_pcm_open_preferred(&data->pcmHandle, &card, &dev, SND_PCM_OPEN_CAPTURE);