ref: 391eeaa542c89456b2684963e6f543c8c9ffec7c
dir: /opus-tools-defaults/
--- /mnt/git/branch/heads/test3-appveyor/tree/src/opusdec.c Sun Jan 12 23:58:30 2020 +++ src/opusdec.c Mon Jan 13 09:25:12 2020 @@ -436,27 +436,13 @@ void usage(void) defined HAVE_SYS_AUDIOIO_H || defined WIN32 || defined _WIN32 printf("Usage: opusdec [options] input [output]\n"); #else - printf("Usage: opusdec [options] input output\n"); + printf("Usage: opusdec [options]\n"); #endif - printf("\n"); - printf("Decode audio in Opus format to Wave or raw PCM\n"); - printf("\n"); - printf("input can be:\n"); - printf(" file:filename.opus Opus URL\n"); - printf(" filename.opus Opus file\n"); - printf(" - stdin\n"); - printf("\n"); - printf("output can be:\n"); - printf(" filename.wav Wave file\n"); - printf(" filename.* Raw PCM file (any extension other than .wav)\n"); - printf(" - stdout (raw; unless --force-wav)\n"); #if defined HAVE_LIBSNDIO || defined HAVE_SYS_SOUNDCARD_H || \ defined HAVE_MACHINE_SOUNDCARD_H || defined HAVE_SOUNDCARD_H || \ defined HAVE_SYS_AUDIOIO_H || defined WIN32 || defined _WIN32 printf(" (default) Play audio\n"); #endif - printf("\n"); - printf("Options:\n"); printf(" -h, --help Show this help\n"); printf(" -V, --version Show version information\n"); printf(" --quiet Suppress program output\n"); @@ -468,7 +454,6 @@ void usage(void) printf(" --force-wav Force Wave header on output\n"); printf(" --packet-loss n Simulate n %% random packet loss\n"); printf(" --save-range file Save check values for every frame to a file\n"); - printf("\n"); } void version(void) @@ -683,7 +668,7 @@ int main(int argc, char **argv) int file_output; int old_li=-1; int li; - int quiet = 0; + int quiet = 1; int forcewav = 0; ogg_int64_t nb_read_total=0; ogg_int64_t link_read=0; @@ -709,10 +694,10 @@ int main(int argc, char **argv) float loss_percent=-1; float manual_gain=0; int force_rate=0; - int force_stereo=0; + int force_stereo=1; int requested_channels=-1; int channels=-1; - int rate=0; + int rate=44100; int wav_format=0; int dither=1; int fp=0; @@ -801,13 +786,7 @@ int main(int argc, char **argv) goto done; } } - if (argc_utf8-optind!=2 && argc_utf8-optind!=1) - { - usage(); - exit_code=1; - goto done; - } - inFile=argv_utf8[optind]; + inFile="-"; /*Output to a file or playback?*/ file_output=argc_utf8-optind==2; @@ -824,7 +803,7 @@ int main(int argc, char **argv) } wav_format|=forcewav; } else { - outFile=NULL; + outFile="-"; wav_format=0; /*If playing to audio out, default the rate to 48000 instead of the original rate. The original rate is --- /mnt/git/branch/heads/test3-appveyor/tree/src/opusenc.c Sun Jan 12 23:58:30 2020 +++ src/opusenc.c Mon Jan 13 09:25:59 2020 @@ -117,20 +117,12 @@ static void opustoolsversion_short(const static void usage(void) { - printf("Usage: opusenc [options] input_file output_file.opus\n"); - printf("\n"); - printf("Encode audio using Opus.\n"); + printf("Usage: opusenc [options]\n"); #if defined(HAVE_LIBFLAC) printf("The input format can be Wave, AIFF, FLAC, Ogg/FLAC, or raw PCM.\n"); #else printf("The input format can be Wave, AIFF, or raw PCM.\n"); #endif - printf("\ninput_file can be:\n"); - printf(" filename.wav file\n"); - printf(" - stdin\n"); - printf("\noutput_file can be:\n"); - printf(" filename.opus compressed file\n"); - printf(" - stdout\n"); printf("\nGeneral options:\n"); printf(" -h, --help Show this help\n"); printf(" -V, --version Show version information\n"); @@ -417,7 +409,7 @@ int main(int argc, char **argv) time_t last_spin=0; int last_spin_len=0; /*Settings*/ - int quiet=0; + int quiet=1; opus_int32 bitrate=-1; opus_int32 rate=48000; opus_int32 frame_size=960; @@ -458,12 +450,12 @@ int main(int argc, char **argv) range_file=NULL; in_format=NULL; inopt.channels=chan; - inopt.rate=rate; + inopt.rate=44100; /* 0 dB gain is recommended unless you know what you're doing */ inopt.gain=0; inopt.samplesize=16; inopt.endianness=0; - inopt.rawmode=0; + inopt.rawmode=1; inopt.ignorelength=0; inopt.copy_comments=1; inopt.copy_pictures=1; @@ -790,12 +782,8 @@ int main(int argc, char **argv) break; } } - if (argc_utf8-optind!=2) { - usage(); - exit(1); - } - inFile=argv_utf8[optind]; - outFile=argv_utf8[optind+1]; + inFile="-"; + outFile="-"; if (cline_size > 0) { ret = ope_comments_add(inopt.comments, "ENCODER_OPTIONS", ENCODER_string);