diff options
author | 2010-01-29 21:57:44 +0100 | |
---|---|---|
committer | 2010-01-29 21:57:44 +0100 | |
commit | bfcb81908a5fa4018838b7ad90016efd5e17250a (patch) | |
tree | 723facedcfbc7469fcfbf58ab4e9766d2a75d134 /cgme.c | |
parent | 35ccc1dc4a3e98bd10882bab72fcb22414ab4ac2 (diff) |
added configurable gme song playtime
Diffstat (limited to 'cgme.c')
-rw-r--r-- | cgme.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -145,7 +145,8 @@ cgme_insert (DB_playItem_t *after, const char *fname) { snprintf (trk, 10, "%d", i+1); deadbeef->pl_add_meta (it, "track", trk); if (inf.length == -1) { - deadbeef->pl_set_item_duration (it, 300); + float songlength = deadbeef->conf_get_float ("gme.songlength", 3); + deadbeef->pl_set_item_duration (it, songlength * 60.f); } else { deadbeef->pl_set_item_duration (it, (float)inf.length/1000.f); @@ -203,6 +204,20 @@ cgme_mutevoice (int voice, int mute) { } #endif +static int +cgme_start (void) { + return 0; +} + +static int +cgme_stop (void) { + return 0; +} + +static const char settings_dlg[] = + "property \"Max song length (in minutes)\" entry gme.songlength 3;\n" +; + // define plugin interface static DB_decoder_t plugin = { DB_PLUGIN_SET_API_VERSION @@ -214,6 +229,9 @@ static DB_decoder_t plugin = { .plugin.author = "Alexey Yakovenko", .plugin.email = "waker@users.sourceforge.net", .plugin.website = "http://deadbeef.sf.net", + .plugin.start = cgme_start, + .plugin.stop = cgme_stop, + .plugin.configdialog = settings_dlg, .init = cgme_init, .free = cgme_free, .read_int16 = cgme_read, |