Microphone array library usage problems

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Posts: 28
Joined: Fri Oct 13, 2017 4:11 am

Microphone array library usage problems

Postby mark-jack » Thu Dec 28, 2017 10:29 am

I use xvf3000 development board to run 1i6o2 program, why the microphone to capture a frame only a sampling point?Programming Manual said to modify MIC_ARRAY_MAX_FRAME_SIZE_LOG2 can make a frame contains multiple sampling points, I modified MIC_ARRAY_MAX_FRAME_SIZE_LOG2 to 8, that is, a frame of 256 sampling points, why the program will have a large delay, playback and recording will be very slow?If anyone knows about the sampling mechanism of the microphone in the program, please give me some inspiration or tell me how to modify the program, I would be greatly appreciated.
User avatar
XCore Legend
Posts: 1031
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Wed Jan 03, 2018 9:21 am

of course you can change MIC_ARRAY_MAX_FRAME_SIZE_LOG2 and lib_mic_array will present a frame of samples of size 2^n. However, the rest of the 1i6o2 system (effectively the USB audio design) is sample based, meaning it exchanges a single frame of samples one period long and so will not work properly when presented the first sample only of a block.

If you want a larger frame of mic samples (for example to do DSP on) then you will need to add a task to convert from block to sample before you pass samples to audio. This is as simple as a double buffer and the opposite is done (sample to block) in BeClearBuff() which builds 256 sample frames for the input to AEC. You would need to put this task at the single sample rate side of your system. ie. it gets passed a pointer to block and then chews through those one sample at a time.

Who is online

Users browsing this forum: No registered users and 6 guests