Cog/Audio/AudioDecoder.m
vspader 96ed93e5eb Fixed some problems with non-lowercase file extensions.
Added automatic filetype finding for quicktime plugin. Note that the files it adds are rather generous (txt, swf, and other file types that are not neccessarily audio)
2007-06-10 22:05:49 +00:00

26 lines
550 B
Objective-C

//
// AudioDecoder.m
// CogAudio
//
// Created by Vincent Spader on 2/21/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "AudioDecoder.h"
#import "PluginController.h"
@implementation AudioDecoder
+ (id<CogDecoder>) audioDecoderForURL:(NSURL *)url
{
NSString *ext = [[url path] pathExtension];
NSDictionary *decoders = [[PluginController sharedPluginController] decoders];
Class decoder = NSClassFromString([decoders objectForKey:[ext lowercaseString]]);
return [[[decoder alloc] init] autorelease];
}
@end