Click here to Skip to main content
11,931,104 members (63,252 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ audio
Can someone tell me why when I try to get audio device caps with the lines

int nwaveOutDevs = waveOutGetNumDevs();
if ( nwaveOutDevs ){
	waveInGetDevCaps( 0, &wOC, sizeof(WAVEINCAPS) )
i get wOC.wchannels = 65535 ???

thank for your responses!!
Posted 27-Sep-12 1:01am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try this line of code.


What does waveInGetDevCaps() return?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i checked the result of waveInGetDevCaps() and initialized the wOC var

the return value is MMSYSERR_NOERROR.
int nwaveInDevs = waveInGetNumDevs();
	if ( nwaveInDevs ){
		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....
Sergey Alexandrovich Kryukov 15-Apr-14 11:35am
Not an answer. Such posts are considered as abuse.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100