[Openal-devel] Patch for intermittent ALSA capture
Chris Robinson
chris.kcat at gmail.com
Tue May 6 16:30:06 PDT 2008
On Tuesday 06 May 2008 03:41:32 pm Jason Daly wrote:
> I discovered that I can't call alcCaptureStart(), then alcCaptureStop(),
> then alcCaptureStart() again. This is with oal-soft 1.3.253, using the
> ALSA backend.
>
> I attached a patch that fixes it. Basically, you just need to call
> snd_pcm_prepare before each call to snd_pcm_start (not just the first
> one). If you don't do this, the second and subsequent start calls
> return an error, which snd_strerror reports as "File descriptor in bad
> state".
Hmm, that's odd. I don't remember having issues on my machine with starting
and stopping. Though I've had other issues with apps indescriminately setting
large buffer sizes without concern for hardware caps.. Regardless, I applied
the fix.
And sorry for being really silent lately. I've been distracted by other
projects, and I'm not entirely sure what I want/can do with OpenAL Soft (and
further apologies to Daniel Peacock for not replying to his email).
But on the subject of what to do with OpenAL Soft, I've been wondering about
splitting out the main mixer so that it runs in a seperate process, and using
IPC and shared memory so that multiple apps can use a unique context on the
same device (so, for example, a media player can open a device with openal
soft, get a context and turn off the uneeded features for faster processing,
while a game has that same device open with 3d audio + effects, all being
mixed and output into one ALSA/OSS device). I'm not too sure of how efficient
I could get a setup like that working, though..
More information about the Openal-devel
mailing list