From 28483484c0a1b4911ed09018f37a505a2eaf1e3f Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 2 Jan 2011 13:16:18 +0100 Subject: load instruments and samples metadata in dumb plugin --- plugins/dumb/cdumb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins/dumb') diff --git a/plugins/dumb/cdumb.c b/plugins/dumb/cdumb.c index c7072fcc..239c7650 100644 --- a/plugins/dumb/cdumb.c +++ b/plugins/dumb/cdumb.c @@ -752,6 +752,17 @@ cdumb_insert (DB_playItem_t *after, const char *fname) { else { deadbeef->pl_add_meta (it, "title", NULL); } + int i; + for (i = 0; i < itsd->n_instruments; i++) { + char key[100]; + snprintf (key, sizeof (key), "INST%03d", i); + deadbeef->pl_add_meta (it, key, (const char *)itsd->instrument[i].name); + } + for (i = 0; i < itsd->n_samples; i++) { + char key[100]; + snprintf (key, sizeof (key), "SAMP%03d", i); + deadbeef->pl_add_meta (it, key, (const char *)itsd->sample[i].name); + } dumb_it_do_initial_runthrough (duh); deadbeef->pl_set_item_duration (it, duh_get_length (duh)/65536.0f); it->filetype = ftype; -- cgit v1.2.3