Python RPi ALSA - Use of multiple channels

不羁岁月 提交于 2019-12-23 02:25:13

问题


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

来源:https://stackoverflow.com/questions/42027487/python-rpi-alsa-use-of-multiple-channels

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!