Changeset 1024
- Timestamp:
- 10/21/07 12:41:16 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/Audio/Properties/MonkeysAudioPropertiesReader.mm
r731 r1024 29 29 30 30 - (BOOL) readProperties:(NSError **)error 31 { 32 NSMutableDictionary *propertiesDictionary; 33 NSString *path; 34 IAPEDecompress *decompressor; 35 str_utf16 *chars; 36 int result; 37 31 { 38 32 // Setup converter 39 path= [[self valueForKey:StreamURLKey] path];40 chars= GetUTF16FromANSI([path fileSystemRepresentation]);33 NSString *path = [[self valueForKey:StreamURLKey] path]; 34 str_utf16 *chars = GetUTF16FromANSI([path fileSystemRepresentation]); 41 35 NSAssert(NULL != chars, NSLocalizedStringFromTable(@"Unable to allocate memory.", @"Errors", @"")); 42 36 43 decompressor = CreateIAPEDecompress(chars, &result); 37 int result; 38 IAPEDecompress *decompressor = CreateIAPEDecompress(chars, &result); 44 39 if(NULL == decompressor || ERROR_SUCCESS != result) { 45 40 if(nil != error) { … … 58 53 } 59 54 60 propertiesDictionary = [NSMutableDictionary dictionary];55 NSMutableDictionary *propertiesDictionary = [NSMutableDictionary dictionary]; 61 56 62 57 [propertiesDictionary setValue:NSLocalizedStringFromTable(@"Monkey's Audio", @"Formats", @"") forKey:PropertiesFileTypeKey]; … … 64 59 [propertiesDictionary setValue:NSLocalizedStringFromTable(@"APE", @"Formats", @"") forKey:PropertiesFormatDescriptionKey]; 65 60 [propertiesDictionary setValue:[NSNumber numberWithLongLong:decompressor->GetInfo(APE_DECOMPRESS_TOTAL_BLOCKS)] forKey:PropertiesTotalFramesKey]; 66 // [propertiesDictionary setValue:[NSNumber numberWithLong:bitrate] forKey:@"averageBitrate"];61 // [propertiesDictionary setValue:[NSNumber numberWithLong:bitrate] forKey:@"averageBitrate"]; 67 62 [propertiesDictionary setValue:[NSNumber numberWithUnsignedInt:decompressor->GetInfo(APE_INFO_BITS_PER_SAMPLE)] forKey:PropertiesBitsPerChannelKey]; 68 63 [propertiesDictionary setValue:[NSNumber numberWithUnsignedInt:decompressor->GetInfo(APE_INFO_CHANNELS)] forKey:PropertiesChannelsPerFrameKey];
