aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-13 19:36:14 -0700
committerChris Robinson <[email protected]>2009-08-13 19:36:14 -0700
commite0792912028d143b89b3835b2a7203693a494d0f (patch)
tree763e226941fbad9850b8cfc29d309d3c92ea6537 /Alc/alsa.c
parent826c641668a14c244bac30d61a681c6817461f80 (diff)
Remove unnecessary function parameters
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 9b47b7e0..2e33dd3f 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -549,7 +549,7 @@ static void alsa_stop_context(ALCdevice *device, ALCcontext *context)
}
-static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
+static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName)
{
snd_pcm_hw_params_t *p;
snd_pcm_uframes_t bufferSizeInFrames;
@@ -608,7 +608,7 @@ open_alsa:
return ALC_FALSE;
}
- switch(aluBytesFromFormat(format))
+ switch(aluBytesFromFormat(pDevice->Format))
{
case 1:
data->format = SND_PCM_FORMAT_U8;
@@ -618,7 +618,7 @@ open_alsa:
break;
default:
data->format = SND_PCM_FORMAT_UNKNOWN;
- AL_PRINT("Unknown format?! %x\n", format);
+ AL_PRINT("Unknown format?! %x\n", pDevice->Format);
}
str = GetConfigValue("alsa", "mmap", "true");
@@ -628,7 +628,7 @@ open_alsa:
atoi(str) != 0);
err = NULL;
- bufferSizeInFrames = SampleSize;
+ bufferSizeInFrames = pDevice->BufferSize;
psnd_pcm_hw_params_malloc(&p);
if(!allowmmap)
@@ -648,7 +648,7 @@ open_alsa:
if(err == NULL && (i=psnd_pcm_hw_params_set_channels(data->pcmHandle, p, aluChannelsFromFormat(pDevice->Format))) < 0)
err = "set channels";
/* set rate (implicitly constrains period/buffer parameters) */
- if(err == NULL && (i=psnd_pcm_hw_params_set_rate(data->pcmHandle, p, frequency, 0)) < 0)
+ if(err == NULL && (i=psnd_pcm_hw_params_set_rate(data->pcmHandle, p, pDevice->Frequency, 0)) < 0)
err = "set rate near";
/* set buffer size in frame units (implicitly sets period size/bytes/time and buffer time/bytes) */
if(err == NULL && (i=psnd_pcm_hw_params_set_buffer_size_min(data->pcmHandle, p, &bufferSizeInFrames)) < 0)
@@ -674,7 +674,7 @@ open_alsa:
if(err == NULL && (i=psnd_pcm_hw_params_set_channels(data->pcmHandle, p, aluChannelsFromFormat(pDevice->Format))) < 0)
err = "set channels";
/* set rate (implicitly constrains period/buffer parameters) */
- if(err == NULL && (i=psnd_pcm_hw_params_set_rate(data->pcmHandle, p, frequency, 0)) < 0)
+ if(err == NULL && (i=psnd_pcm_hw_params_set_rate(data->pcmHandle, p, pDevice->Frequency, 0)) < 0)
err = "set rate near";
/* set buffer size in frame units (implicitly sets period size/bytes/time and buffer time/bytes) */
if(err == NULL && (i=psnd_pcm_hw_params_set_buffer_size_near(data->pcmHandle, p, &bufferSizeInFrames)) < 0)
@@ -716,7 +716,7 @@ open_alsa:
ALuint frameSize = aluChannelsFromFormat(pDevice->Format);
frameSize *= aluBytesFromFormat(pDevice->Format);
- data->ring = CreateRingBuffer(frameSize, SampleSize);
+ data->ring = CreateRingBuffer(frameSize, pDevice->BufferSize);
if(!data->ring)
{
AL_PRINT("ring buffer create failed\n");