File: hello_world.c

package info (click to toggle)
freealut 1.1.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,152 kB
  • sloc: sh: 8,617; ansic: 2,738; makefile: 89
file content (23 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}