请问关于openal的问题。
#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下是可以听到声音的。