Fix VGM parsing so it doesn't hit the other two registered VGM container handlers
parent
5c85c2a1b9
commit
cb8fb9ce87
|
@ -18,7 +18,9 @@
|
|||
+ (NSArray *)fileTypes
|
||||
{
|
||||
//There doesn't seem to be a way to get this list. These are the only multitrack types.
|
||||
return [NSArray arrayWithObjects:@"ay", @"gbs", @"hes", @"kss", @"nsf", @"nsfe", @"sap", @"sgc", nil];
|
||||
return [NSArray arrayWithObjects:@"ay", @"gbs", @"hes", @"kss", @"nsf", @"nsfe", @"sap", @"sgc",
|
||||
@"vgm",@"vgz", // These are included so they can override AdPlug
|
||||
nil];
|
||||
}
|
||||
|
||||
+ (NSArray *)mimeTypes
|
||||
|
@ -38,6 +40,14 @@
|
|||
// input url already has fragment defined - no need to expand further
|
||||
return [NSMutableArray arrayWithObject:url];
|
||||
}
|
||||
|
||||
// Dodge both VGMStream and AdPlug
|
||||
NSString * extension = [url pathExtension];
|
||||
if (extension && ([extension caseInsensitiveCompare:@"vgm"] == NSOrderedSame ||
|
||||
[extension caseInsensitiveCompare:@"vgz"] == NSOrderedSame))
|
||||
{
|
||||
return [NSMutableArray arrayWithObject:[NSURL URLWithString:[[url absoluteString] stringByAppendingString:@"#0"]]];
|
||||
}
|
||||
|
||||
id audioSourceClass = NSClassFromString(@"AudioSource");
|
||||
id<CogSource> source = [audioSourceClass audioSourceForURL:url];
|
||||
|
|
Loading…
Reference in New Issue