LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

retrieve sound card settings

Is there a way to read the sound card settings - sample rate, no. of bits, etc?
0 Kudos
Message 1 of 6
(3,347 Views)

Joemara,

It seems that LabVIEW is very capable of configuring a sound card (Sound Input Configure.vi).  However, there is no VI in LabVIEW that can go out and get the settings of your card. I would guess that this could be done by calling a .dll with such functionality.

Charlie M. CLD
0 Kudos
Message 2 of 6
(3,323 Views)
Thanks Charlie.
 
It looks like winmm.dll has some of the functions I need. So I could use the call library function node to access the dll functions. However, as I am not an expert in windows programming, I do not know where to find the parameters for the function prototypes. What is the best to figure this out?
 
Thanks,
Joemar
0 Kudos
Message 3 of 6
(3,312 Views)
http://svn.dsource.org/projects/bindings/trunk/win32/mmsystem.d

contains function prototypes, enums and structure definitions.  It does not look like you are gonna have fun with this just skimming it.

You may get lucky and try using tools-->Import-->shared library and use the above file as the header.  It may work. I doubt it... but worth a try.
BTW, I found this file from:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1119369&SiteID=1

Paul
0 Kudos
Message 4 of 6
(3,311 Views)

Thanks Stradis,

I tried your suggection but it did not work. I found this:

http://msdn2.microsoft.com/en-us/library/ms713750.aspx

I added hwo and pdwrate parameters but dont know how to proceed.

 

Thanks,

Joemar

0 Kudos
Message 5 of 6
(3,298 Views)
Hi Joemar.
As far as I know winmm.dll does not support getting this information from LabVIEW directly.
Your approach to use waveOutGetPlaybackRate cannot work without having called waveOutOpen before. Bad luck: waveOutOpen requires the specification of the format you want to playback ... So you won't get the results that you intended this way ...
If you are a skilled DLL programmer (in text-based languages) you might dive into MS's mixer API and write/code your wrapper.
Maybe, you find a LabVIEW-compatible mixer.dll on the shareware market. (If you find a freeware -> Let me know.)
Hope this helps, Guenter
0 Kudos
Message 6 of 6
(3,290 Views)