Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!f1g2000prb.googlegroups.com!not-for-mail
From: =?EUC-KR?B?wLG/tb/s?= <zeroyy@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: real-time data acquisition from a custom device
Date: Tue, 17 Mar 2009 19:14:29 -0700 (PDT)
Organization: http://groups.google.com
Lines: 21
Message-ID: <c342fe34-f30f-4025-ade1-400b43e705e8@f1g2000prb.googlegroups.com>
NNTP-Posting-Host: 129.254.164.36
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1237342469 9379 127.0.0.1 (18 Mar 2009 02:14:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 18 Mar 2009 02:14:29 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f1g2000prb.googlegroups.com; posting-host=129.254.164.36; 
	posting-account=Ej-O7woAAAALfZSdGVi4VHLp8Lk0rllz
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
	AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.48 Safari/525.19,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:525733


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.