CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  C/C++ >  C++ 语言

扬声器发声

楼主uglylourt(我是凡人)2005-04-27 22:09:19 在 C/C++ / C++ 语言 提问

在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

相关问题

  • 扬声器发声
  • 如何让主板扬声器发声
  • 如何让主板扬声器发声
  • 请问在vc下面怎么让扬声器发声
  • 麻烦帮检查一下这个扬声器发声程序
  • 关于扬声器发声问题,请大虾指教.
  • 有没有相关的AT命令写入modem的寄存器,让modem的扬声器永远不再发声??
  • 有个问题也许很简单,可我不会,请高手快来帮我!——在VB中怎样控制系统扬声器发声?
  • 分数不高希望各位鼎力相助,Delphi如何实现应用程序出现在任务栏右边和使机器扬声器发声?
  • 请教vc++中如何控制扬声器的声响?

关键词

  • 发声
  • 扬声器
  • fdwsound
  • sound
  • snd
  • playsound
  • specified
  • associ
  • resource
  • filename

得分解答快速导航

  • 帖主:uglylourt
  • bing_huo
  • zdy_8212

相关链接

  • C/C++ Blog
  • C/C++类图书
  • C/C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo