Mercurial > audlegacy-plugins
diff src/modplug/modplugbmp.cxx @ 1688:d6d8e3cd23c5
Branch merge.
| author | Matti Hamalainen <ccr@tnsp.org> |
|---|---|
| date | Thu, 06 Sep 2007 03:03:03 +0300 |
| parents | d158ce84fda7 be8babbd772c |
| children | a945460e921c 5638651b7b3d |
line wrap: on
line diff
--- a/src/modplug/modplugbmp.cxx Wed Sep 05 09:29:26 2007 +0300 +++ b/src/modplug/modplugbmp.cxx Thu Sep 06 03:03:03 2007 +0300 @@ -19,6 +19,7 @@ #include "audacious/tuple.h" #include "audacious/tuple_formatter.h" #include "audacious/vfs.h" +#include "audacious/strings.h" } static char* format_and_free_ti( Tuple* ti, int* length ) @@ -505,7 +506,7 @@ { CSoundFile* lSoundFile; Archive* lArchive; - char* tmps; + gchar* tmps; //open and mmap the file lArchive = OpenArchive(aFilename); @@ -546,8 +547,15 @@ } tuple_associate_string(ti, FIELD_CODEC, NULL, tmps); tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); + tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); + + /* NOTICE! FIXME? This is actually incorrect. We _cannot_ know what charset + * an arbitrary module file uses .. typically it is some DOS CP-variant, + * except for true Amiga modules. + */ + tmps = str_to_utf8(lSoundFile->GetTitle()); tuple_associate_string(ti, FIELD_TITLE, NULL, lSoundFile->GetTitle()); - tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); + g_free(tmps); //unload the file lSoundFile->Destroy();
