2007-02-24 20:36:27 +00:00
|
|
|
//
|
|
|
|
// MADPropertiesReader.m
|
|
|
|
// MAD
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 2/24/07.
|
|
|
|
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "MonkeysAudioPropertiesReader.h"
|
|
|
|
#import "MonkeysAudioDecoder.h"
|
|
|
|
|
|
|
|
@implementation MonkeysAudioPropertiesReader
|
|
|
|
|
2007-03-04 18:20:23 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
|
|
|
NSDictionary *properties;
|
|
|
|
MonkeysAudioDecoder *decoder;
|
|
|
|
|
|
|
|
decoder = [[MonkeysAudioDecoder alloc] init];
|
2007-03-04 18:20:23 +00:00
|
|
|
if (![decoder open:source])
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
2007-10-13 07:51:42 +00:00
|
|
|
[decoder release];
|
2007-02-24 20:36:27 +00:00
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
properties = [decoder properties];
|
|
|
|
|
|
|
|
[decoder close];
|
2007-10-13 07:51:42 +00:00
|
|
|
[decoder release];
|
2007-02-24 20:36:27 +00:00
|
|
|
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ (NSArray *)fileTypes
|
|
|
|
{
|
|
|
|
return [MonkeysAudioDecoder fileTypes];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|