Bonjour,
Je viens de commencer à parcourir la doc d'ALUT disponible ici http://www.openal.org/openal_webstf/specs/alut.html
La fonction alutLoadMemoryHelloWorld me pose des problèmes. En effet j'ai un Segmentation fault à son appel.
Ci-après le code source complet.
cheers
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 #include <stdlib.h> #include <stdio.h> #include <AL/alut.h> static void reportError (void) { fprintf (stderr, "ALUT error: %s\n", alutGetErrorString (alutGetError ())); } int main (int argc, char **argv) { ALuint buffer, source; ALenum *format; ALsizei *sndDataSize; ALfloat *frequency; ALvoid *sndData; if(!alutInit (&argc, argv)) reportError (); // loads the sound of someone saying 'Hello, world!' if(!(sndData = alutLoadMemoryHelloWorld(format, sndDataSize, frequency))) reportError (); free (sndData); if(!alutExit ()) reportError (); return EXIT_SUCCESS; }
Partager