00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 static const char help_msg[]=
00014 " \n"
00015 " NAME: \n"
00016 " WavPause \n"
00017 " \n"
00018 " DESCRIPTION: \n"
00019 " \n"
00020 " Generate a pause file. The lenght of the pause can be absolute, given in \n"
00021 " seconds, or relative to the lenght of the RIFF WAV file. The command \n"
00022 " \n"
00023 " % WavPause --duration=5.0 --output-file=five_sec_pause.wav \n"
00024 " \n"
00025 " would generate a 5 seconds pause WAV file, five_sec_pause.wav. \n"
00026 " To generate a pause file twice as long as the input file, use \n"
00027 " \n"
00028 " % WavPause --multiplier=2 --input-file=meou.wav \\ \n"
00029 " --output-file=meou_pause.wav \n"
00030 " changed with --output-file=NAME options. \n"
00031 " \n"
00032 " USAGE: \n"
00033 " \n"
00034 " shell> WavPause [OPTIONS] \n"
00035 " \n"
00036 " OPTIONS: \n"
00037 " \n"
00038 " -l, --duration NUM - Absolute pause duration in seconds (double). \n"
00039 " -M, --multiplier NUM - Multilpier used to calculate relative pause \n"
00040 " duration. \n"
00041 " -i, --input-file NAME - Use input file NAME's length as base for the \n"
00042 " multiplier \n"
00043 " -o, --output-file NAME - Write the output file to NAME file \n"
00044 " -p, --percent - Print to stdout percent of completion. \n"
00045 " Useful for GUIs. \n"
00046 " -D, --log-file NAME - Write debug to NAME file \n"
00047 " -d, --log-stdout - Write debug to standard output \n"
00048 " -z, --log-size NUM - Maximum size debug file can reach (dfl: is 10Mb) \n"
00049 " -m, --mask MASK - Mask (default: ALL = 0x7fffffff) \n"
00050 " -h, --help - Print this messag \n"
00051 " -v, --version - Print version number \n";
00052
00053
00054 #ifdef HAVE_CONFIG_H
00055 #include "config.h"
00056 #endif
00057 #include "WavPause-main.h"
00058 #include "WavPause.h"
00059
00060 int
00061 main (int argc, char* argv[])
00062 {
00063 static const char release[] = VERSION;
00064 int patch_level = 0;
00065
00066 WavPause& server = *WavPause::getInstance ();
00067
00068 server.set_version (release, patch_level);
00069 server.set_author ("Vladislav Grinchenko");
00070
00071 server.init (&argc, argv, help_msg);
00072
00073 server.initServer ();
00074 server.processServer ();
00075
00076 return server.get_exit_value ();
00077 }