Python RPi ALSA - Use of multiple channels

2019-06-03 23:19发布

I have this piece of a code and I want to work independently with each of the four mic array I use (Ps3 Eye Cam). For example I want to calculate cross-correlation between the mic 1 and the mic 4 excluding 2 and 3. How can I use channels I want?

import audioop
import alsaaudio
inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE,alsaaudio.PCM_NONBLOCK)
inp.setchannels(1)
inp.setrate(8000)
inp.setformat(alsaaudio.PCM_FORMAT_S16_LE)
inp.setperiodsize(1000)

Thanks

0条回答
登录 后发表回答