Mercurial > audlegacy
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 93:245b1307e182 | 94:2801eda0683f |
|---|---|
| 4 * | 4 * |
| 5 * Driver for Game_Music_Emu library. See details at: | 5 * Driver for Game_Music_Emu library. See details at: |
| 6 * http://www.slack.net/~ant/libs/ | 6 * http://www.slack.net/~ant/libs/ |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "Audacious_Driver.h" | |
| 9 | 10 |
| 11 #include "libaudacious/configfile.h" | |
| 12 #include "libaudacious/util.h" | |
| 13 #include "libaudacious/titlestring.h" | |
| 14 #include <gtk/gtk.h> | |
| 15 | |
| 16 #include <cstring> | |
| 17 | |
| 18 static Spc_Emu *spc = NULL; | |
| 19 static GThread decode_thread; | |
| 20 | |
| 21 static int is_our_file(gchar *filename) | |
| 22 { | |
| 23 gchar *ext; | |
| 24 | |
| 25 ext = strrchr(filename, '.'); | |
| 26 | |
| 27 if (ext) | |
| 28 { | |
| 29 if (!strcasecmp(ext, ".spc")) | |
| 30 return 1; | |
| 31 } | |
| 32 | |
| 33 return 0; | |
| 34 } | |
| 35 | |
| 36 static gchar *get_title(gchar *filename) | |
| 37 { | |
| 38 TitleInput *input; | |
| 39 gchar *title; | |
| 40 Emu_Std_Reader reader; | |
| 41 Spc_Emu::header_t header; | |
| 42 | |
| 43 reader.open(filename); | |
| 44 reader.read(&header, sizeof(header)); | |
| 45 | |
| 46 title = g_strdup(header.song); | |
| 47 | |
| 48 return title; | |
| 49 } |
