I have xCORE Array Microphone kit and referring to 'app_usb_aud_mic_array' source. It works perfect. For some sound localization task I want to perform cross correlation between different mic channels. Default functionality of USB audio in and out also should work with this. For this I tried below two things:
- Replace mic_array_init_time_domain_frame, mic_array_get_next_time_domain_frame, mic_array_frame_time_domain from pcm_pdm_mic.xc of module usb audio; with respective frequency domain functions. But through user_pdm_process() function I am not able to convert frequency bins to time domain frames to output them on output audio channel. I couldn't see required library function for FFT frames to time domain to achieve default behaviour
- By keeping time domain code as it is I tried to add parallel tasks to get and process frequency domain frames like this: But I get compilation errors like 'c_ds_output' used in more than two parallel statements. If I try to solve it with some workaround I get stuck in another errors. I am not getting how to execute these parallel
Code: Select all
par { mic_array_pdm_rx(p_pdm_mics, c_4x_pdm_mic_0, c_4x_pdm_mic_1); mic_array_decimate_to_pcm_4ch(c_4x_pdm_mic_0, c_ds_output[0], MIC_ARRAY_NO_INTERNAL_CHANS); mic_array_decimate_to_pcm_4ch(c_4x_pdm_mic_1, c_ds_output[1], MIC_ARRAY_NO_INTERNAL_CHANS); pdm_process(c_ds_output, c_pcm_out); pdm_process_fft(c_ds_output, c_pcm_out); }
Thanks,
Shailesh