diff options
Diffstat (limited to 'examples/alreverb.c')
-rw-r--r-- | examples/alreverb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/alreverb.c b/examples/alreverb.c index 7d2bb343..ec71f354 100644 --- a/examples/alreverb.c +++ b/examples/alreverb.c @@ -217,15 +217,16 @@ int main(int argc, char **argv) ALuint source, buffer, effect, slot; ALenum state; - /* Print out usage if no file was specified */ + /* Print out usage if no arguments were specified */ if(argc < 2) { - fprintf(stderr, "Usage: %s <filename>\n", argv[0]); + fprintf(stderr, "Usage: %s [-device <name] <filename>\n", argv[0]); return 1; } - /* Initialize OpenAL with the default device, and check for EFX support. */ - if(InitAL() != 0) + /* Initialize OpenAL, and check for EFX support. */ + argv++; argc--; + if(InitAL(&argv, &argc) != 0) return 1; if(!alcIsExtensionPresent(alcGetContextsDevice(alcGetCurrentContext()), "ALC_EXT_EFX")) @@ -269,7 +270,7 @@ int main(int argc, char **argv) #undef LOAD_PROC /* Load the sound into a buffer. */ - buffer = LoadSound(argv[1]); + buffer = LoadSound(argv[0]); if(!buffer) { CloseAL(); |