Line | |
---|
1 | #include <stdlib.h> |
---|
2 | #include <AL/alut.h> |
---|
3 | |
---|
4 | /* |
---|
5 | This is the 'Hello World' program from the ALUT |
---|
6 | reference manual. |
---|
7 | |
---|
8 | Link using '-lalut -lopenal -lpthread'. |
---|
9 | */ |
---|
10 | |
---|
11 | int |
---|
12 | main (int argc, char **argv) |
---|
13 | { |
---|
14 | ALuint helloBuffer, helloSource; |
---|
15 | alutInit (&argc, argv); |
---|
16 | helloBuffer = alutCreateBufferHelloWorld (); |
---|
17 | alGenSources (1, &helloSource); |
---|
18 | alSourcei (helloSource, AL_BUFFER, helloBuffer); |
---|
19 | alSourcePlay (helloSource); |
---|
20 | alutSleep (1); |
---|
21 | alutExit (); |
---|
22 | return EXIT_SUCCESS; |
---|
23 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.