linux如何开发openal?

cx820402 2010-11-04 05:48:15
RT,有没有小例子之类的。谢谢。
...全文
147 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cx820402 2010-11-05
  • 打赏
  • 举报
回复
#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下是可以听到声音的。
steptodream 2010-11-04
  • 打赏
  • 举报
回复
学习就要多google
http://dev.firnow.com/course/6_system/linux/Linuxxl/20100107/187116.html
louyong0571 2010-11-04
  • 打赏
  • 举报
回复
还以为是opengl,al还真不懂

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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