Ignore:
Timestamp:
05/10/07 15:58:05 (17 years ago)
Author:
r2d
Message:

Use getopt.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/mpcdec/mpcdec.c

    r317 r318  
    3737#include <mpc/mpcdec.h>
    3838#include <libwaveformat.h>
    39 #include <unistd.h>
     39#include <getopt.h>
    4040
    4141#ifdef WIN32
     
    6363        printf("file: %s\n", filename);
    6464        printf("stream version %d\n", info->stream_version);
    65         printf("encoder: \%s\n", info->encoder);
    66         printf("profile: \%s (q=%0.2f)\n", info->profile_name, info->profile - 5);
    67         printf("PNS: \%s\n", info->pns == 0xFF ? "unknow" : info->pns ? "on" : "off");
     65        printf("encoder: %s\n", info->encoder);
     66        printf("profile: %s (q=%0.2f)\n", info->profile_name, info->profile - 5);
     67        printf("PNS: %s\n", info->pns == 0xFF ? "unknow" : info->pns ? "on" : "off");
    6868        printf("mid/side stereo: %s\n", info->ms ? "on" : "off");
    69         printf("gapless: \%s\n", info->is_true_gapless ? "on" : "off");
    70         printf("average bitrate: \%6.1f kbps\n", info->average_bitrate * 1.e-3);
    71         printf("samplerate: \%d Hz\n", info->sample_freq);
    72         printf("channels: \%d\n", info->channels);
    73         printf("length: \%d:\%.2d (%u samples)\n", minutes, seconds, (mpc_uint32_t)mpc_streaminfo_get_length_samples(info));
    74         printf("file size: \%d Bytes\n", info->total_file_length);
    75         printf("track peak: \%2.2f dB\n", info->peak_title / 256.);
    76         printf("track gain: \%2.2f dB / %2.2f dB\n", info->gain_title / 256., info->gain_title == 0 ? 0 : 65. - info->gain_title / 256.);
    77         printf("album peak: \%2.2f dB\n", info->peak_album / 256.);
    78         printf("album gain: \%2.2f dB / %2.2f dB\n", info->gain_album / 256., info->gain_album == 0 ? 0 : 65. - info->gain_album / 256.);
     69        printf("gapless: %s\n", info->is_true_gapless ? "on" : "off");
     70        printf("average bitrate: %6.1f kbps\n", info->average_bitrate * 1.e-3);
     71        printf("samplerate: %d Hz\n", info->sample_freq);
     72        printf("channels: %d\n", info->channels);
     73        printf("length: %d:%.2d (%u samples)\n", minutes, seconds, (mpc_uint32_t)mpc_streaminfo_get_length_samples(info));
     74        printf("file size: %d Bytes\n", info->total_file_length);
     75        printf("track peak: %2.2f dB\n", info->peak_title / 256.);
     76        printf("track gain: %2.2f dB / %2.2f dB\n", info->gain_title / 256., info->gain_title == 0 ? 0 : 65. - info->gain_title / 256.);
     77        printf("album peak: %2.2f dB\n", info->peak_album / 256.);
     78        printf("album gain: %2.2f dB / %2.2f dB\n", info->gain_album / 256., info->gain_album == 0 ? 0 : 65. - info->gain_album / 256.);
    7979        printf("\n");
    8080
     
    101101        mpc_bool_t is_wav_output;
    102102        int c;
    103         extern char * optarg;
    104         extern int optind;
    105103
    106104    printf("mpcdec - musepack (mpc) decoder sample application\n");
Note: See TracChangeset for help on using the changeset viewer.