Old 24th June 2012, 02:10   #1
a2534838
Junior Member
 
Join Date: Mar 2011
Posts: 3
How to get unicode files in input plug-in?

For transcoding and metadata there are "winampGetExtendedRead_openW" and "winampGetExtendedFileInfoW" but how can I open unicode files for playback, "int play(char* fn)" does not seem to have a wide version also fn is not UTF8 encoded I only get ??? for unicode chars.

How do I get the unicode filenames for "In_Module" methods?
a2534838 is offline   Reply With Quote
Old 24th June 2012, 07:39   #2
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,037
Send a message via Skype™ to thinktink
If you look at the IN2.h header definition from the latest SDK you'll see that the parameter is not defined as char * but as in_char * instead:



#ifdef UNICODE_INPUT_PLUGIN
#define in_char wchar_t
#define IN_VER (IN_UNICODE | 0x100)
#else
#define in_char char
#define IN_VER 0x100
#endif



...

int (*Play)(const in_char *fn);




You need to define a global compiler directive UNICODE_INPUT_PLUGIN somewhere in your plugin project.
thinktink is offline   Reply With Quote
Old 24th June 2012, 09:08   #3
a2534838
Junior Member
 
Join Date: Mar 2011
Posts: 3
Thanks, you're right the plug-in I'm working on still had an old header.
a2534838 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump