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

Subject: real-time data acquisition from a custom device

From: 윤영우

Date: 18 Mar, 2009 02:14:29

Message: 1 of 2

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 2

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

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
data acquisition Sherryl Radbil 19 Mar, 2009 08:36:38
daq Sherryl Radbil 19 Mar, 2009 08:36:34
sound card Sherryl Radbil 19 Mar, 2009 08:36:30
rssFeed for this Thread

Contact us at files@mathworks.com