Mercurial > almixer_isolated
comparison EXAMPLES/playsound.c @ 7:ee50db043251
Cross-platform fixes.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Thu, 28 Oct 2010 02:33:05 -0700 |
parents | 26aec5629f68 |
children | eca6f008fad0 |
comparison
equal
deleted
inserted
replaced
6:4b1048af7e55 | 7:ee50db043251 |
---|---|
31 g_PlayingAudio[which_channel] = AL_FALSE; | 31 g_PlayingAudio[which_channel] = AL_FALSE; |
32 } | 32 } |
33 | 33 |
34 int main(int argc, char* argv[]) | 34 int main(int argc, char* argv[]) |
35 { | 35 { |
36 ALint i; | |
37 ALboolean still_playing = AL_TRUE; | |
38 | |
39 ALmixer_Data* audio_data[MAX_SOURCES]; | |
36 if(argc < 1) | 40 if(argc < 1) |
37 { | 41 { |
38 printf("Pass a sound file (or files) as a parameter\n"); | 42 printf("Pass a sound file (or files) as a parameter\n"); |
39 } | 43 } |
40 else if(argc-1 > MAX_SOURCES) | 44 else if(argc-1 > MAX_SOURCES) |
41 { | 45 { |
42 printf("Maximum supported files is %d\n", MAX_SOURCES); | 46 printf("Maximum supported files is %d\n", MAX_SOURCES); |
43 } | 47 } |
44 size_t i; | |
45 ALboolean still_playing = AL_TRUE; | |
46 | 48 |
47 ALmixer_Data* audio_data[MAX_SOURCES]; | |
48 ALmixer_Init(22050, 0, 0); | 49 ALmixer_Init(22050, 0, 0); |
49 | 50 |
50 for(i=1; i<argc; i++) | 51 for(i=1; i<argc; i++) |
51 { | 52 { |
52 if(!(audio_data[i-1]=ALmixer_LoadAll( argv[i], AL_TRUE) )) | 53 if(!(audio_data[i-1]=ALmixer_LoadAll( argv[i], AL_TRUE) )) |