Ignore:
Timestamp:
11/13/06 20:15:00 (17 years ago)
Author:
r2d
Message:
  • added "live" bitrate
  • added pns and gapless info
File:
1 edited

Legend:

Unmodified
Added
Removed
  • xmms-musepack/branches/r2d/src/libmpc.cpp

    r103 r127  
    512512        GtkWidget* streamLabel    = mpcGtkLabel(infoVbox);
    513513        GtkWidget* encoderLabel   = mpcGtkLabel(infoVbox);
    514         GtkWidget* profileLabel   = mpcGtkLabel(infoVbox);
     514                GtkWidget* profileLabel   = mpcGtkLabel(infoVbox);
     515                GtkWidget* pnsLabel       = mpcGtkLabel(infoVbox);
     516                GtkWidget* gaplessLabel   = mpcGtkLabel(infoVbox);
    515517        GtkWidget* bitrateLabel   = mpcGtkLabel(infoVbox);
    516518        GtkWidget* rateLabel      = mpcGtkLabel(infoVbox);
     
    535537            mpcGtkPrintLabel(streamLabel,    "Streamversion %d", info.stream_version);
    536538            mpcGtkPrintLabel(encoderLabel,   "Encoder: \%s", info.encoder);
    537             mpcGtkPrintLabel(profileLabel,   "Profile: \%s", info.profile_name);
     539                        mpcGtkPrintLabel(profileLabel,   "Profile: \%s", info.profile_name);
     540                        mpcGtkPrintLabel(pnsLabel,       "PNS: \%s", info.pns ? "on" : "off");
     541                        mpcGtkPrintLabel(gaplessLabel,   "Gapless: \%s", info.is_true_gapless ? "on" : "off");
    538542            mpcGtkPrintLabel(bitrateLabel,   "Average bitrate: \%6.1f kbps", info.average_bitrate * 1.e-3);
    539543            mpcGtkPrintLabel(rateLabel,      "Samplerate: \%d Hz", info.sample_freq);
     
    827831                        if (!mpcDecoder.isPause && status == 0 && MpcPlugin.output->output_time() == 0)
    828832                                break;
    829             xmms_usleep(10000);
     833            xmms_usleep(100000);
    830834                }
    831835        }
     
    837841static int processBuffer(MPC_SAMPLE_FORMAT* sampleBuffer, char* xmmsBuffer, mpc_demux& demux)
    838842{
    839     mpc_uint32_t vbrAcc = 0;
    840     mpc_uint32_t vbrUpd = 0;
    841843        mpc_frame_info info;
    842844
     
    847849    if (pluginConfig.dynamicBitrate)
    848850    {
    849         track.bitrate = static_cast<int> (vbrUpd * track.sampleFreq / 1152);
     851        track.bitrate = static_cast<int> (info.bits * track.sampleFreq / 1152);
    850852    }
    851853
Note: See TracChangeset for help on using the changeset viewer.