Fix AdPlug decoder.
parent
75bc139600
commit
ea3ef1cadd
|
@ -33,9 +33,15 @@
|
|||
[self setSource:s];
|
||||
|
||||
m_emu = new CNemuopl(44100);
|
||||
|
||||
NSString * path = [[s url] absoluteString];
|
||||
NSRange fragmentRange = [path rangeOfString:@"#" options:NSBackwardsSearch];
|
||||
if (fragmentRange.location != NSNotFound) {
|
||||
path = [path substringToIndex:fragmentRange.location];
|
||||
}
|
||||
|
||||
std::string path = [[[[source url] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] UTF8String];
|
||||
m_player = CAdPlug::factory(path, m_emu, CAdPlug::players, CProvider_cog( path, source ));
|
||||
std::string _path = [[path stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] UTF8String];
|
||||
m_player = CAdPlug::factory(_path, m_emu, CAdPlug::players, CProvider_cog( _path, source ));
|
||||
|
||||
if ( !m_player )
|
||||
return 0;
|
||||
|
|
|
@ -46,8 +46,14 @@
|
|||
|
||||
Copl * p_emu = new CSilentopl;
|
||||
|
||||
std::string path = [[[url absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] UTF8String];
|
||||
CPlayer * p_player = CAdPlug::factory(path, p_emu, CAdPlug::players, CProvider_cog( path, source ));
|
||||
NSString * path = [url absoluteString];
|
||||
NSRange fragmentRange = [path rangeOfString:@"#" options:NSBackwardsSearch];
|
||||
if (fragmentRange.location != NSNotFound) {
|
||||
path = [path substringToIndex:fragmentRange.location];
|
||||
}
|
||||
|
||||
std::string _path = [[path stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] UTF8String];
|
||||
CPlayer * p_player = CAdPlug::factory(_path, p_emu, CAdPlug::players, CProvider_cog( _path, source ));
|
||||
|
||||
if ( !p_player )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue