扬声器发声
在DOS环境下扬声器的发声函数是sound().和nosound()
请问我windows环境下的扬声器的发声函数是那个?
因该包含哪个头文件阿?
因为我的毕业设计时要做一个音乐播放器,(我非计算机专业,唉!不会哦,如果那位仁兄有代码提供,本人不胜受恩感激!!!)谢了。
问题点数:20、回复次数:7Top
1 楼bing_huo(我是一个演员!)回复于 2005-04-27 22:10:51 得分 0
找找d3d方面的资料吧Top
2 楼losky(理性的人背叛内心,感性的人背叛现实)回复于 2005-04-27 22:15:14 得分 0
cout<<char(7);
就会发声Top
3 楼bing_huo(我是一个演员!)回复于 2005-04-27 22:16:43 得分 15
音乐播放器哦。。。楼上的好象不行。。。
下面这个api可以直接播放wav文件 更具体的 查下msdn吧
The PlaySound function plays a sound specified by the given filename, resource, or system event. (A system event may be associated with a sound in the registry or in the WIN.INI file.)
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
Parameters
pszSound
A string that specifies the sound to play. If this parameter is NULL, any currently playing waveform sound is stopped. To stop a non-waveform sound, specify SND_PURGE in the fdwSound parameter.
Three flags in fdwSound (SND_ALIAS, SND_FILENAME, and SND_RESOURCE) determine whether the name is interpreted as an alias for a system event, a filename, or a resource identifier. If none of these flags are specified, PlaySound searches the registry or the WIN.INI file for an association with the specified sound name. If an association is found, the sound event is played. If no association is found in the registry, the name is interpreted as a filename.
hmod
Handle to the executable file that contains the resource to be loaded. This parameter must be NULL unless SND_RESOURCE is specified in fdwSound.
fdwSound
Flags for playing the sound. The following values are defined.Top
4 楼yjm0105(流云)回复于 2005-04-27 22:18:42 得分 0
也可以嘛,di,di,di---,--,di...不是音乐吗:)Top
5 楼bing_huo(我是一个演员!)回复于 2005-04-27 22:24:05 得分 0
哦。。也对。。。晕一下先。。。。Top
6 楼zdy_8212(zdy_8212)回复于 2005-04-28 03:20:52 得分 5
找下D3D,我还没有涉及这方面的。要不就看下包含下相关影音库吧。。也许有所启发Top
7 楼uglylourt(我是凡人)回复于 2005-04-28 11:34:16 得分 0
第一次在csdn上发贴子,想不到这么快就有回复.
谢谢csdn的朋友们!!!Top




