--- openal-soft-1.8.466/Alc/alsa.c 2009-05-26 23:54:15.000000000 +0200 +++ openal-soft-1.8.466/Alc/alsa.c 2009-08-16 11:09:57.000000000 +0200 @@ -537,7 +537,6 @@ static void alsa_close_playback(ALCdevic 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); } @@ -652,7 +652,7 @@ open_alsa: if((i=psnd_pcm_hw_params_any(data->pcmHandle, p)) < 0) err = "any"; /* set interleaved access */ - if(err == NULL && (i=psnd_pcm_hw_params_set_access(data->pcmHandle, p, SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) + if(err == NULL && (i=psnd_pcm_hw_params_set_access(data->pcmHandle, p, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) err = "set access"; /* set format (implicitly sets sample bits) */ if(err == NULL && (i=psnd_pcm_hw_params_set_format(data->pcmHandle, p, data->format)) < 0)