[Openal] Open Capture Device fails with "invalid argument"
Chris Robinson
chris.kcat at gmail.com
Fri Apr 17 05:29:32 PDT 2009
On Friday 17 April 2009 5:10:12 am Stefan Kögel wrote:
> Huh, it did not work for me.
>
> I compiled openAl 1.7.411 and changed the buffer size to various amounts...
>
> ALCdevice *CaptureDevice=alcCaptureOpenDevice(NULL, 11025 ,
> AL_FORMAT_MONO16, 48);
>
> What I get is:
>
> AL lib: alsa.c:612: set access failed: Invalid argument
> AL lib: ALc.c:1352: exit(): closing 1 Device
>
> Is a buffer size of 48 still to big?
Hmm, I misread that. It was failing to use mmap capture. Though the buffer
size would've been a problem, and you needed to upgrade to use a non-mmap
capture mode, anyway.
You can increase the buffer size to something more sane (non-mmap mode can use
virtually any size; mmap would be restricted to a couple thousand samples,
IIRC).
It looks like the capture device is opening, though. It still prints out that
message because mmap fails, but it automatically falls back to a non-mmap
method in 1.7. If you want to get rid of that warning message, add this to
your ~/.alsoftrc:
[alsa]
mmap = false
That will disable mmap for both capture and playback, so if mmap for playback
works, you may not want to do that.
More information about the Openal
mailing list