01-28-2010 05:08 PM
01-29-2010 06:27 AM - edited 01-29-2010 06:28 AM
A major problem with Labview is that NI focus to much on user-friendly functions. The result is that is very easy to write ineffective code for a beginner. Your and also aeastet code was full of unnecessary typecasting back and forth. Then I am making Labview code one of the first thing I do is to throw out much of the flimflam that NI include in the code.
I have modified your code it should be much more efficient now. You may need to relink to the sound2.dll. You will find it here \National Instruments\LabVIEW 8.x\resource\lvsound2.dll
Right-click the Call Library Function and select Configure from the shortcut menu to display the Call Library Function dialog box, which you can use to specify the library name or path, function name, calling conventions, parameters, and return value for the node. When you click the OK button, the node automatically resizes to have the correct number of terminals and sets the terminals to the correct data types.
I hope this will help you some
02-11-2010 06:04 AM
Why did you start a new thread posting the same code as you started with here. A code which was full time consuming type casting back and forth? Did you try my code, and did you have any trouble with it.
In your reposting you complain about time delay. But then I must remind you about the fact that Windows is not a real time OS. You have to work with chunks of sound. The size of the chunks (in time domain) should be slightly larger than the time it takes to process them. So the more efficient your code is the smaller chunks. I also do not know how efficient the Labview/Matlab interface is. Maybe you could cut some processing time by implementing the functions in Labview
02-11-2010 07:22 AM
02-11-2010 07:28 AM
02-11-2010 10:24 AM
02-11-2010 03:57 PM
02-12-2010 07:36 AM
02-12-2010 07:43 AM - edited 02-12-2010 07:45 AM
I am sorry it was some errors in my program. I swapped the task ID.
I am in hurry so I made a picture of my modifications. But you should be able to to do it. Most of the mods are just deleted wires.
Edit: Also set number of channels to 1 in the front panel (mono)
02-16-2010 11:58 AM