This question is not really psp related...but I try to ask. ;)
In OGG Vorbis and FLAC you can add the cover art and this will be saved in a comment named COVERART_UUENCODED.
I'm trying to retrieve the cover art but it seems I'm unable to do it.
I found no documentation on the web, but (from the name) I guess the string is uuencoded.
I tried to uudecode the data with this function that gets 4 encoded chars and outputs the corresponding 3 decoded chars (at least I think so):
Code: Select all
/* single-character decode */
#define DEC(c) (((c) - ' ') & 077)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// UUDECODE: decodes a group of 4 characters (outputs 3 characters)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void uudecode(char *encoded, char *decoded, int outCharNumber){
int c1 = 0;
int c2 = 0;
int c3 = 0;
c1 = DEC(*encoded) << 2 | DEC(encoded[1]) >> 4;
c2 = DEC(encoded[1]) << 4 | DEC(encoded[2]) >> 2;
c3 = DEC(encoded[2]) << 6 | DEC(encoded[3]);
if (outCharNumber >= 1)
decoded[0] = c1;
if (outCharNumber >= 2)
decoded[1] = c2;
if (outCharNumber >= 3)
decoded[2] = c3;
decoded[3] = '\0';
}
Can someone help me decoding this data, please? :)
Here you can download the encoded data and my "decoded" data.
http://upload2.net/page/download/EsH7bk ... t.rar.html
Many thanks
Ciaooo
Sakya