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 "CoreAudioPropertiesReader.h"
|
|
|
|
#import "CoreAudioDecoder.h"
|
|
|
|
|
|
|
|
@implementation CoreAudioPropertiesReader
|
|
|
|
|
2007-03-04 04:36:10 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
|
2007-02-24 20:36:27 +00:00
|
|
|
{
|
|
|
|
NSDictionary *properties;
|
|
|
|
CoreAudioDecoder *decoder;
|
|
|
|
|
|
|
|
decoder = [[CoreAudioDecoder alloc] init];
|
2007-03-04 04:36:10 +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 [CoreAudioDecoder fileTypes];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|