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 "FlacPropertiesReader.h"
|
|
|
|
#import "FlacDecoder.h"
|
|
|
|
|
|
|
|
@implementation FlacPropertiesReader
|
|
|
|
|
2007-03-04 21:32:03 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
|
|
|
NSDictionary *properties;
|
|
|
|
FlacDecoder *decoder;
|
|
|
|
|
|
|
|
decoder = [[FlacDecoder alloc] init];
|
2007-03-04 21:32:03 +00:00
|
|
|
if (![decoder open:source])
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
properties = [decoder properties];
|
|
|
|
|
|
|
|
[decoder close];
|
|
|
|
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ (NSArray *)fileTypes
|
|
|
|
{
|
|
|
|
return [FlacDecoder fileTypes];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|