Mercurial > audlegacy
diff Plugins/Input/console/Audacious_Driver.cpp @ 94:2801eda0683f trunk
[svn] Some routines here. Hehe.
author | nenolod |
---|---|
date | Tue, 01 Nov 2005 20:45:32 -0800 |
parents | 252843aac42f |
children | 8247bbf454a8 |
line wrap: on
line diff
--- a/Plugins/Input/console/Audacious_Driver.cpp Tue Nov 01 20:20:20 2005 -0800 +++ b/Plugins/Input/console/Audacious_Driver.cpp Tue Nov 01 20:45:32 2005 -0800 @@ -6,4 +6,44 @@ * http://www.slack.net/~ant/libs/ */ +#include "Audacious_Driver.h" +#include "libaudacious/configfile.h" +#include "libaudacious/util.h" +#include "libaudacious/titlestring.h" +#include <gtk/gtk.h> + +#include <cstring> + +static Spc_Emu *spc = NULL; +static GThread decode_thread; + +static int is_our_file(gchar *filename) +{ + gchar *ext; + + ext = strrchr(filename, '.'); + + if (ext) + { + if (!strcasecmp(ext, ".spc")) + return 1; + } + + return 0; +} + +static gchar *get_title(gchar *filename) +{ + TitleInput *input; + gchar *title; + Emu_Std_Reader reader; + Spc_Emu::header_t header; + + reader.open(filename); + reader.read(&header, sizeof(header)); + + title = g_strdup(header.song); + + return title; +}