00001 #ifdef __WIN32__ 00002 00003 /*****************************************************************************\ 00004 * * 00005 * Name : playsound * 00006 * Author : Chris Koeritz * 00007 * * 00008 * Purpose: * 00009 * * 00010 * A program intended to be as simple as possible and to play only WAV * 00011 * files on the win32 platform. It was decided that this was needed because * 00012 * windows media player suddenly became political and started complaining * 00013 * when other programs were registered to play different sound types. * 00014 * All this does is play WAV files. That's it. * 00015 * * 00016 ******************************************************************************* 00017 * Copyright (c) 2000-$now By Author. This program is free software; you can * 00018 * redistribute it and/or modify it under the terms of the GNU General Public * 00019 * License as published by the Free Software Foundation; either version 2 of * 00020 * the License or (at your option) any later version. This is online at: * 00021 * http://www.fsf.org/copyleft/gpl.html * 00022 * Please send any updates to: fred@gruntose.com * 00023 \*****************************************************************************/ 00024 00025 #include <basis/convert_utf.h> 00026 #include <basis/istring.h> 00027 #include <loggers/console_logger.h> 00028 #include <data_struct/static_memory_gremlin.h> 00029 00030 #include <mmsystem.h> 00031 00032 HOOPLE_STARTUP_CODE; 00033 00034 int main(int argc, char *argv[]) 00035 { 00036 console_logger out; 00037 if (argc < 2) { 00038 out.log(istring(argv[0]) + " usage:"); 00039 out.log("This program takes one or more parameters which are interpreted"); 00040 out.log("as the names of sound files."); 00041 return 12; 00042 } 00043 for (int i = 1; i < argc; i++) { 00044 // out.log(istring(istring::SPRINTF, "soundfile %d: %s", i, argv[i])); 00045 if (!PlaySound(to_unicode_temp(argv[i]), NIL, SND_FILENAME)) 00046 out.log(istring("failed to play ") + argv[i]); 00047 } 00048 return 0; 00049 } 00050 00051 #endif // OS guard. 00052 00053 //temp copied from checker. 00054 #ifdef __BUILD_STATIC_APPLICATION__ 00055 // static dependencies found by buildor_gen_deps.sh: 00056 #include <basis/array.cpp> 00057 #include <basis/byte_array.cpp> 00058 #include <basis/callstack_tracker.cpp> 00059 #include <basis/chaos.cpp> 00060 #include <basis/convert_utf.cpp> 00061 #include <basis/definitions.cpp> 00062 #include <basis/earth_time.cpp> 00063 #include <basis/guards.cpp> 00064 #include <basis/istring.cpp> 00065 #include <basis/log_base.cpp> 00066 #include <basis/memory_checker.cpp> 00067 #include <basis/mutex.cpp> 00068 #include <basis/object_base.cpp> 00069 #include <basis/outcome.cpp> 00070 #include <basis/packable.cpp> 00071 #include <basis/portable.cpp> 00072 #include <basis/sequence.cpp> 00073 #include <basis/set.cpp> 00074 #include <basis/utility.cpp> 00075 #include <basis/version_record.cpp> 00076 #include <data_struct/amorph.cpp> 00077 #include <data_struct/bit_vector.cpp> 00078 #include <data_struct/byte_hasher.cpp> 00079 #include <data_struct/configurator.cpp> 00080 #include <data_struct/hash_table.cpp> 00081 #include <data_struct/pointer_hash.cpp> 00082 #include <data_struct/stack.cpp> 00083 #include <data_struct/static_memory_gremlin.cpp> 00084 #include <data_struct/string_hash.cpp> 00085 #include <data_struct/string_hasher.cpp> 00086 #include <data_struct/string_table.cpp> 00087 #include <data_struct/symbol_table.cpp> 00088 #include <data_struct/table_configurator.cpp> 00089 #include <loggers/console_logger.cpp> 00090 #include <loggers/file_logger.cpp> 00091 #include <loggers/locked_logger.cpp> 00092 #include <loggers/null_logger.cpp> 00093 #include <loggers/program_wide_logger.cpp> 00094 #include <opsystem/byte_filer.cpp> 00095 #include <opsystem/command_line.cpp> 00096 #include <opsystem/critical_events.cpp> 00097 #include <opsystem/directory.cpp> 00098 #include <opsystem/filename.cpp> 00099 #include <opsystem/ini_config.cpp> 00100 #include <opsystem/ini_parser.cpp> 00101 #include <opsystem/path_configuration.cpp> 00102 #include <opsystem/rendezvous.cpp> 00103 #include <textual/byte_format.cpp> 00104 #include <textual/parser_bits.cpp> 00105 #include <textual/string_manipulation.cpp> 00106 #include <textual/tokenizer.cpp> 00107 #endif // __BUILD_STATIC_APPLICATION__ 00108
1.5.1