aboutsummaryrefslogtreecommitdiff
path: root/tests/freealut/examples/hello_world.c
diff options
context:
space:
mode:
authorÉloi Rivard <azmeuk@gmail.com>2013-04-04 23:28:51 +0200
committerÉloi Rivard <azmeuk@gmail.com>2013-04-05 10:26:20 +0200
commit4aa4db6f10f3a065a0f20942fa671ffff5b9ae05 (patch)
tree8aeb833751896d0a5e5c61c7a040e00dcc7645f0 /tests/freealut/examples/hello_world.c
parent783959338a8ea3f380c7287efd7d2bf151b6e140 (diff)
* Added freealut testcase.
Diffstat (limited to 'tests/freealut/examples/hello_world.c')
-rw-r--r--tests/freealut/examples/hello_world.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/freealut/examples/hello_world.c b/tests/freealut/examples/hello_world.c
new file mode 100644
index 00000000..ca5b4490
--- /dev/null
+++ b/tests/freealut/examples/hello_world.c
@@ -0,0 +1,23 @@
+#include <stdlib.h>
+#include <AL/alut.h>
+
+/*
+ This is the 'Hello World' program from the ALUT
+ reference manual.
+
+ Link using '-lalut -lopenal -lpthread'.
+*/
+
+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;
+}