帮助:waveOutGetDevsCaps问题 [英] HELP: waveOutGetDevsCaps problem

查看:72
本文介绍了帮助:waveOutGetDevsCaps问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我为什么当我尝试获得带有线条的音频设备盖时吗

Can someone tell me why when I try to get audio device caps with the lines

int nwaveOutDevs = waveOutGetNumDevs();

if ( nwaveOutDevs ){

	WAVEINCAPS wOC;

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

	}
}


我得到wOC.wchannels = 65535 ???


感谢您的答复!


i get wOC.wchannels = 65535 ???


thank for your responses!!

推荐答案

尝试以下代码.

Try this line of code.

WAVEINCAPS wOC = {0};



waveInGetDevCaps()返回什么?



What does waveInGetDevCaps() return?


我检查了waveInGetDevCaps()的结果并初始化了wOC var

返回值为MMSYSERR_NOERROR.
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!!");

	}



但是调试我得到了

wChannels = 65535

waveOut的故事也一样....



but stll with the debug i get

wChannels = 65535

story is the same for waveOut....


这篇关于帮助:waveOutGetDevsCaps问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆