Thread Subject: real-time data acquisition from a custom device

Subject: real-time data acquisition from a custom device

From: zeroyy ?

Date: 18 Mar, 2009 00:45:14

Message: 1 of 3

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.

Subject: real-time data acquisition from a custom device

From: Sherryl Radbil

Date: 19 Mar, 2009 12:36:01

Message: 2 of 3

Hi,
If your device adheres to the Windows MME interface
(see http://msdn.microsoft.com/en-us/library/aa909811.aspx)
it can be supported by Data Acquisition Toolbox. There are some limitations you can read about here:
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/f5-54943.html
http://www.mathworks.com/support/solutions/data/1-19SDX.html
The winsound interface constrains the sound card to up to 24 bits per sample,
with the default set to 16. This help page gives more information
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/bitspersample.html

If your device does adhere to Windows MME then you can see examples and documentation here:
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/daq.html
http://www.mathworks.com/products/daq/demos.html

Sherryl

Subject: real-time data acquisition from a custom device

From: zeroyy ?

Date: 20 Mar, 2009 00:31:00

Message: 3 of 3

Thanks for your reply, but my device doesn't adhere to Windows MME.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
daq Sherryl Radbil 19 Mar, 2009 08:36:23
data acquisition Sherryl Radbil 19 Mar, 2009 08:36:19
sound card Sherryl Radbil 19 Mar, 2009 08:36:14
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com