LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

waveoutopen

Hello

I use an old version Labwindows 5.5 on a Windows XP PC, with generally no special difficulties.

But with some Windows SDK functions, its seems that there are problems.

For instance, calling WaveOutOpen with the WAVE_FORMAT_QUERY option always returns 0 (no error), even with a wrong format (ex: sample rate=96000kHz, 24 bits per sample...). Code example :

i = AudioDevice (0 to n)

WAVEFORMATEX *OutWavFormat;

    OutWavFormat = (WAVEFORMATEX *)malloc(sizeof(WAVEFORMATEX));
    OutWavFormat->wFormatTag = WAVE_FORMAT_PCM;
    OutWavFormat->nChannels = OutChannelNb;    
    OutWavFormat->nSamplesPerSec = SampleRate;
    OutWavFormat->wBitsPerSample = BitsPerSample;
    OutWavFormat->nBlockAlign = OutChannelNb*BitsPerSample/8;
    OutWavFormat->nAvgBytesPerSec = SampleRate*OutChannelNb*BitsPerSample/8;
test = waveOutOpen(NULL, i, OutWavFormat, 0,0L, WAVE_FORMAT_QUERY);

I suppose the problem is due to operating system, XP instead of 2000, Windows at that time was not able to use modern sound cards (24bits, 96 ou 192kHz...).

Any simple solution to overcome this problem ? Is it possible to install a newer Windows SDK ? Or just call the corresponding XP DLL (documentation...) ?

Thanks in advance.

0 Kudos
Message 1 of 2
(2,919 Views)

Hello,

 

Thanks you for your posting on National Instruments Forum,

 

The following informations can help you :

 

Change the Standard I/O Window Using Windows SDK Functions

 

LabWindows/CVI Delay Function vs. Windows SDK Sleep Function


 


Brice S.
National Instruments France

0 Kudos
Message 2 of 2
(2,903 Views)