summaryrefslogtreecommitdiff
path: root/cgme.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-29 23:14:15 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-29 23:14:15 +0100
commit9460844e2a1598dfe24a72dd2a283d02b57caddc (patch)
tree0ec32a2b5453d3e5d299aa325b3c5a3be964092a /cgme.c
parente09556d82ca4b470dc8f5904a1080dffe2ffeb7b (diff)
parentfeecc0214decb6d1b9911aafe140034449266430 (diff)
Merge branch 'master' into devel
Conflicts: plugins/vorbis/vorbis.c streamer.c
Diffstat (limited to 'cgme.c')
-rw-r--r--cgme.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/cgme.c b/cgme.c
index e6355421..c953f39d 100644
--- a/cgme.c
+++ b/cgme.c
@@ -143,7 +143,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);
@@ -201,6 +202,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
@@ -213,6 +228,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,