Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

testSound.cpp

Go to the documentation of this file.
00001 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #include <stdio.h>
00017 #include <SDL/SDL.h>
00018 #include <unistd.h>
00019 #include <sound.h>
00020 
00021 int main( int argc, char **argv ) {
00022   initSound();
00023   for( int i=1; i<argc; ++i ) {
00024     printf( "Loading %s.\n", argv[i] );
00025     Sound *s = new Sound(argv[i]);
00026     printf( "Playing %s.\n", argv[i] );
00027     s->play();
00028 //      printf( "Pausing 1 second." );
00029 //      sleep(1);
00030     printf( " Press a key for next sound . " );
00031     getchar();
00032     
00033     printf( "Freeing %s.\n", argv[i] );
00034     delete s;
00035   }
00036   closeSound();
00037 }
00038 

Generated on Tue Jun 24 01:27:53 2008 for Advanced Strategic Command by  doxygen 1.4.2