Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/freealut-1.1.0/examples/hello_world.c @ 19

Last change on this file since 19 was 14, checked in by landauf, 16 years ago

added freealut

File size: 477 bytes
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
11int
12main (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.