请问关于openal的问题。

cx820402 2010-11-05 11:29:16
#include <stdlib.h>
#include <AL/alut.h>
int main (int argc, char **argv)
{
ALuint helloBuffer, helloSource;
alutInit (&argc, argv);
helloBuffer = alutCreateBufferHelloWorld ();
alGenSources (1, &helloSource);
alSourcei (helloSource, AL_BUFFER, helloBuffer);
alSourcePlay (helloSource);
alutSleep (1);
alutExit ();
return EXIT_SUCCESS;
}

请问这样的程序,我在linux下用:gcc -lalut -lopenal -lpthread helloworld.c -o helloword
运行程序,没有声音的啊?谢谢。
PS:在windows下是可以听到声音的。
...全文
97 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dengzikun 2010-11-05
  • 打赏
  • 举报
回复
到这里看看,有关OPENAL的。
http://bbs.gameres.com/showforum.asp?forumid=53

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧