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 "MusepackPropertiesReader.h"
|
|
|
|
#import "MusepackDecoder.h"
|
|
|
|
|
|
|
|
@implementation MusepackPropertiesReader
|
|
|
|
|
2007-03-04 18:41:43 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
|
|
|
NSDictionary *properties;
|
|
|
|
MusepackDecoder *decoder;
|
|
|
|
|
|
|
|
decoder = [[MusepackDecoder alloc] init];
|
2007-03-04 18:41:43 +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 [NSArray arrayWithObject:@"mpc"];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|