aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-07-02 20:32:19 -0700
committerChris Robinson <[email protected]>2009-07-02 20:32:19 -0700
commit432f0ba34cf2bbf1d73472cd69cfce2c0fa9c8f8 (patch)
tree151bc99e2ade1e1896730a4a17fa38bb94516bd1 /Alc
parent7e01e534454d128cf83b8dc32c7a531edd7e8ded (diff)
Specify the right format for ALSA recording
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alsa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index f8e04afa..aabe7226 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -537,7 +537,6 @@ static void alsa_close_playback(ALCdevice *device)
static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
{
- snd_pcm_format_t alsaFormat;
snd_pcm_hw_params_t *p;
snd_pcm_uframes_t bufferSizeInFrames;
snd_pcm_access_t access;
@@ -598,13 +597,13 @@ open_alsa:
switch(aluBytesFromFormat(format))
{
case 1:
- alsaFormat = SND_PCM_FORMAT_U8;
+ data->format = SND_PCM_FORMAT_U8;
break;
case 2:
- alsaFormat = SND_PCM_FORMAT_S16;
+ data->format = SND_PCM_FORMAT_S16;
break;
default:
- alsaFormat = SND_PCM_FORMAT_UNKNOWN;
+ data->format = SND_PCM_FORMAT_UNKNOWN;
AL_PRINT("Unknown format?! %x\n", format);
}