Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ���
Sat, 28 Mar 1998 00:00
����
Author: ���
Date: Sat, 28 Mar 1998 00:00
Date: Sat, 28 Mar 1998 00:00
52 lines
1979 bytes
1979 bytes
����BC31�±��ý����Ƶ�����Ǵ�WAVE�豸����λ����ָ��
�ҵĴ������£�
AudioPro()
{
HWAVEOUT hWaveOutId;
PCMWAVEFORMAT pcm;
WAVEOUTCAPS WaveOutCaps;
pcm.wf.wFormatTag=WAVE_FORMAT_PCM;
pcm.wf.nChannels=1;
pcm.wf.nSamplesPerSec=11025;
pcm.wf.nAvgBytesPerSec=11025;
pcm.wf.nBlockAlign=1;
pcm.wf.wBitsPerSample=8;
if(waveOutGetNumDevs()==0)
{
MessageBeep(0);
MessageBox("There is no MCI device for play-out available");
return ;
}
if(waveOutGetDevCaps(0,&WaveOutCaps,sizeof(WAVEOUTCAPS))!=0)
{
MessageBeep(0);
MessageBox("Get information error");
}
if(waveOutOpen((LPHWAVEOUT)&hWaveOutId,WAVE_MAPPER,&pcm.wf,HWindow,0L,
CALLBACK_WINDOW))
{
MessageBox("Open device error");
return;
}
ͨ��DEBUT������waveOutGetNumDevs()��waveOutGetDevCaps()����أ�����
WaveOutCaps�ṹ��д��ȷ������waveOutOpen()����ֵΪ 1 ���豸����
��λ����ָ��һ������ʤ�м�֮����
Email: hgx@expert.hust.edu.cn
--
[40m[35m|����һ˦|[37;40m[0m
[40m[35m|�������|[37;40m[0m
[40m[35m|���쳤Ц|[37;40m[0m
[40m[35m|����ƽ��|[37;40m[0m
[m[1;35m�� ��Դ:���人���ƻƺ�վ s1000e.whnet.edu.cn��[FROM: 202.114.16.133][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads