9

Semantics of ALSA PCM calls

view full story
linux-howto

http://stackoverflow.com – Hi I am writing a program that has to capture from three input devices at the same time (in this case, it's three identical USB webcams). First of all, ALSA is not based on the familiar UNIX paradigm "everything is a file" so I cannot use the regular poll(3) call; knowing that the data stream should be steady among all devices, for now I do something like: while(!stop) for(i = 0; i < input_device_count; i++) { snd_pcm_readi(handle[i], buffer, frames); write(fd_out[i], buffer, size); } This code iterates over each device and reads from it, writing the result on a file previ (HowTos)