LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lvsound2 dll

Hi,

I am using lvsound2.dll to capture the stereo Input from my External USB sound card (96ksamples/s,16bits).  One of the channels is capturing 1 (rectangular) pulse per second signal.   When I set the capture sampling rate to 96kHz and start capturing, the number of samples captured in a second is different from different conditions*, which means sampling rate is not same for all cases and not same as what I specified to sample at. 

*Different condition means running the same vi in two different computers.

I will eventually build a sound capturing as an exe application and need to make sure the sampling rate I asked for is same as what the lvsound2 gives.  I don't know why they are not same. 

Secondly, I would like to know how detail about lvsound2.dll interface, communication or interaction with PC and sound card.  This should help me to consider various aspects or possible issues on top of the sampling rate problem in my entire design.  So, any one know where to find thoes information?  Does  NI provide the documentation?


Thank you very much in advance for your help and idea.

Regards
Message 1 of 3
(4,686 Views)
Hello Maung Shein,

The intended use for this DLL is to be called from the LabVIEW environment (or exe) through the sound VIs to interface with any of your audio devices. The sound VIs on the programming pallet should provide you with the tools you need to accomplish this type of an application. Because this is the intended use, NI does not document the internal workings of the DLL or how it can be called externally. That being said, you can open and view the VIs on the sound pallet to get a feel for how this DLL is being used.

If you are using LabVIEW and the sound VIs to interface with your sound card, then I would be interested to hear that the sample rate is not functioning incorrectly. You mentioned that the sample rate is not as you expect across different machines. If this is the case, perhaps you can provide a set of steps or a test VI which would illustrate the behavior you are seeing. Does this effect only occur with your external sound card, or can it be reproduced on any machine?

Mike D.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(4,661 Views)

Well, you may not provide the innerworkings, but how about a intended use for each of the function calls.  Your lvsound2.dll crashes all the time, somebody forgot to put a timout in the function and it gets hung up ALL THE TIME! (Like if you plug and unplug something from the audio jack, the device goes from being an availale resource to an unavailable one, however.......this wasn't taken into account when the subvi was put together.  I'm am looking through the available funtions in the dll but there isn't any documentation on them that I have found.  I want to add a timeout.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 3 of 3
(3,759 Views)