diff options
author | James Cowgill <jcowgill@debian.org> | 2017-11-04 22:18:45 +0000 |
---|---|---|
committer | James Cowgill <jcowgill@debian.org> | 2017-11-04 22:18:45 +0000 |
commit | a8a2f152bc3beee99e042993b4443751d8f513ed (patch) | |
tree | a957b2fc2a965343f2befdafed090ebf25da93e5 /openmpt123 | |
parent | c88bd83bd5ed0296053b4f5a77d3f5f98d043cec (diff) |
New upstream version 0.3.2
Diffstat (limited to 'openmpt123')
-rw-r--r-- | openmpt123/openmpt123.cpp | 12 | ||||
-rw-r--r-- | openmpt123/openmpt123.hpp | 11 |
2 files changed, 19 insertions, 4 deletions
diff --git a/openmpt123/openmpt123.cpp b/openmpt123/openmpt123.cpp index 529079f..87a760e 100644 --- a/openmpt123/openmpt123.cpp +++ b/openmpt123/openmpt123.cpp @@ -509,7 +509,7 @@ static void show_info( std::ostream & log, bool verbose ) { log << " <https://libsdl.org/>" << std::endl; #endif #ifdef MPT_WITH_PULSEAUDIO - log << " " << "libpulse, libpulse-simple" << " (headers " << pa_get_headers_version() << ", API " << PA_API_VERSION << ", PROTOCOL " << PA_PROTOCOL_VERSION << ", library " << ( pa_get_library_version() ? pa_get_library_version() : "unkown" ) << ") <https://www.freedesktop.org/wiki/Software/PulseAudio/>" << std::endl; + log << " " << "libpulse, libpulse-simple" << " (headers " << pa_get_headers_version() << ", API " << PA_API_VERSION << ", PROTOCOL " << PA_PROTOCOL_VERSION << ", library " << ( pa_get_library_version() ? pa_get_library_version() : "unknown" ) << ") <https://www.freedesktop.org/wiki/Software/PulseAudio/>" << std::endl; #endif #ifdef MPT_WITH_PORTAUDIO log << " " << Pa_GetVersionText() << " (" << Pa_GetVersion() << ") <http://portaudio.com/>" << std::endl; @@ -604,7 +604,7 @@ static void show_help( textout & log, bool with_info = true, bool longhelp = fal log << " --info Display information about each file" << std::endl; log << " --ui Interactively play each file" << std::endl; log << " --batch Play each file" << std::endl; - log << " --render Render each file to PCM data" << std::endl; + log << " --render Render each file to individual PCM data files" << std::endl; if ( !longhelp ) { log << std::endl; log.writeout(); @@ -654,8 +654,8 @@ static void show_help( textout & log, bool with_info = true, bool longhelp = fal log << " --buffer n Set output buffer size to n ms [default: " << commandlineflags().buffer << "]" << std::endl; log << " --period n Set output period size to n ms [default: " << commandlineflags().period << "]" << std::endl; log << " --stdout Write raw audio data to stdout [default: " << commandlineflags().use_stdout << "]" << std::endl; - log << " --output-type t Use output format t when writing to a PCM file [default: " << commandlineflags().output_extension << "]" << std::endl; - log << " -o, --output f Write PCM output to file f instead of streaming to audio device [default: " << commandlineflags().output_filename << "]" << std::endl; + log << " --output-type t Use output format t when writing to a individual PCM files (only applies to --render mode) [default: " << commandlineflags().output_extension << "]" << std::endl; + log << " -o, --output f Write PCM output to file f instead of streaming to audio device (only applies to --ui and --batch modes) [default: " << commandlineflags().output_filename << "]" << std::endl; log << " --force Force overwriting of output file [default: " << commandlineflags().force_overwrite << "]" << std::endl; log << std::endl; log << " -- Interpret further arguments as filenames" << std::endl; @@ -2382,6 +2382,10 @@ static int main( int argc, char * argv [] ) { textout & log = flags.quiet ? *static_cast<textout*>( &dummy_log ) : *static_cast<textout*>( stdout_can_ui ? &std_out : &std_err ); show_info( log, flags.verbose ); + + if ( !flags.warnings.empty() ) { + log << flags.warnings << std::endl; + } if ( flags.verbose ) { log << flags; diff --git a/openmpt123/openmpt123.hpp b/openmpt123/openmpt123.hpp index edb6553..0aebb92 100644 --- a/openmpt123/openmpt123.hpp +++ b/openmpt123/openmpt123.hpp @@ -303,6 +303,7 @@ struct commandlineflags { std::string output_extension; bool force_overwrite; bool paused; + std::string warnings; void apply_default_buffer_sizes() { if ( ui_redraw_interval == default_high ) { ui_redraw_interval = 50; @@ -484,6 +485,16 @@ struct commandlineflags { if ( samplerate < 0 ) { samplerate = commandlineflags().samplerate; } + if ( mode == ModeRender && !output_filename.empty() ) { + std::ostringstream warning; + warning << "Warning: --output is deprecated in --render mode. Use --output-type instead." << std::endl; + warnings += warning.str(); + } + if ( mode != ModeRender && output_extension != "wav" ) { + std::ostringstream warning; + warning << "Warning: --output-type is deprecated in modes other than --render. Use --output instead." << std::endl; + warnings += warning.str(); + } if ( !output_filename.empty() ) { output_extension = get_extension( output_filename ); } |