|
I try to receive and process sound data frame by frame from a custom audio input board with USB interface in MATLAB. I have used this board through windows drivers and C APIs successfully in C world.
At first, I made a data receiving thread with C-MEX to copy frame buffers and call matlab functions to process and visualize the data. But, I realized that mex functions like mexCallMATLAB are not thread-safe functions. I had no idea to proceed.
Next, I noticed that the DAQ toolbox adaptor kit may work. Here, I don’t want to implement complicated timing codes. Just need places for Init, Start, Stop function and a thread for calling a MATLAB function with a sound frame.
Do you have any idea or suggestion?
Other fancy solutions are welcome.
If the use of DAQ toolbox is best, I need simple examples or tutorials relevant to my problem.
Thanks in advance.
|