Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can someone tell me why when I try to get audio device caps with the lines

C++
int nwaveOutDevs = waveOutGetNumDevs();

if ( nwaveOutDevs ){

	WAVEINCAPS wOC;

	waveInGetDevCaps( 0, &wOC, sizeof(WAVEINCAPS) )
				

	}
}

i get wOC.wchannels = 65535 ???


thank for your responses!!
Posted

Try this line of code.

C++
WAVEINCAPS wOC = {0};


What does waveInGetDevCaps() return?
 
Share this answer
 
i checked the result of waveInGetDevCaps() and initialized the wOC var

the return value is MMSYSERR_NOERROR.
int nwaveInDevs = waveInGetNumDevs();
	
	if ( nwaveInDevs ){

		WAVEINCAPS wOC = {0};

		if (MMSYSERR_NOERROR  == waveInGetDevCaps( 0,&wOC,sizeof(WAVEINCAPS)))
			AfxMessageBox("DONE it!!");

	}


but stll with the debug i get

wChannels = 65535

story is the same for waveOut....
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 15-Apr-14 11:35am    
Not an answer. Such posts are considered as abuse.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900