Changeset 38


Ignore:
Timestamp:
09/22/06 22:17:45 (18 years ago)
Author:
zorg
Message:

Add optional fast seeking check-box. Patch by Nicolas BOTTI

Location:
xmms-musepack/trunk/src
Files:
2 edited

Legend:

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

    r34 r38  
    102102    xmms_cfg_read_boolean(cfg, "musepack", "dynamicBitrate", &pluginConfig.dynamicBitrate);
    103103    xmms_cfg_read_boolean(cfg, "musepack", "replaygain",     &pluginConfig.replaygain);
     104    xmms_cfg_read_boolean(cfg, "musepack", "fastSeek",       &pluginConfig.fastSeek);
    104105    xmms_cfg_free(cfg);
    105106}
     
    152153        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bitrateCheck), pluginConfig.dynamicBitrate);
    153154        gtk_box_pack_start(GTK_BOX(gSvbox), bitrateCheck, FALSE, FALSE, 0);
     155
     156        GtkWidget* seekCheck = gtk_check_button_new_with_label("Enable Fast Seeking");
     157        widgets.seekCheck = seekCheck;
     158        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(seekCheck), pluginConfig.fastSeek);
     159        gtk_box_pack_start(GTK_BOX(gSvbox), seekCheck, FALSE, FALSE, 0);
    154160        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), generalSet, gtk_label_new("Plugin"));
    155161
     
    228234    tb = GTK_TOGGLE_BUTTON(widgets.bitrateCheck);
    229235    pluginConfig.dynamicBitrate = gtk_toggle_button_get_active(tb);
     236    tb = GTK_TOGGLE_BUTTON(widgets.seekCheck);
     237    pluginConfig.fastSeek = gtk_toggle_button_get_active(tb);
    230238    tb = GTK_TOGGLE_BUTTON(widgets.albumCheck);
    231239    pluginConfig.albumGain = gtk_toggle_button_get_active(tb);
     
    237245    xmms_cfg_write_boolean (cfg, "musepack", "dynamicBitrate", pluginConfig.dynamicBitrate);
    238246    xmms_cfg_write_boolean (cfg, "musepack", "replaygain",     pluginConfig.replaygain);
     247    xmms_cfg_write_boolean (cfg, "musepack", "fastSeek",       pluginConfig.fastSeek);
    239248    xmms_cfg_write_default_file (cfg);
    240249
     
    558567            free(entry);
    559568            freeTags(tags);
    560             fclose(input);
     569            fclose(input);
    561570        }
    562571        else
     
    780789    }
    781790
     791    mpc_decoder_set_seeking(&decoder, &info, pluginConfig.fastSeek);
    782792    setReplaygain(info, decoder);
    783793
  • xmms-musepack/trunk/src/libmpc.h

    r34 r38  
    8181    gboolean albumGain;
    8282    gboolean isEq;
     83    gboolean fastSeek;
    8384    iconv_t  iFromUTF8;
    8485    iconv_t  iToUTF8;
     
    9091    GtkWidget* configBox;
    9192    GtkWidget* bitrateCheck;
     93    GtkWidget* seekCheck;
    9294    GtkWidget* clippingCheck;
    9395    GtkWidget* replaygainCheck;
Note: See TracChangeset for help on using the changeset viewer.