On 6 Nov 2013, at 01:57, Jens Alfke <j...@mooseyard.com> wrote: > > On Nov 5, 2013, at 9:49 AM, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote: > >> Maybe Spotlight refuses to index app contents. > > Right. > >> So: how can I get this information directly from the sound files? >> I found some references to QuickTime and Audio Toolbox, but all this is >> deprecated. >> What is the current replacement? > > Use AVFoundation — it has some easy APIs to get this kind of metadata from > audio files.
Works fine. Thank you (both) very much. AVMetadataItem *ai = avaAsset.commonMetadata[ i ]; My sound files all have [ ai.keySpace isEqualToString: AVMetadataKeySpaceiTunes ] = YES. Using [ ai.commonKey isEqualToString: AVMetadataCommonKeyTitle ] works fine. But how is one supposed to use "key"? id aikey = ai.key; // is NSNumber - not documented OSType hfsFileTypeCode = [ aikey unsignedIntValue ]; NSString *ke1 = NSFileTypeForHFSTypeCode ( hfsFileTypeCode ); // not documented either But this gives ke1 = '©nam', not quite the same as AVMetadataiTunesMetadataKeySongName which is "@nam". Without some function like: isEqual( key, AVMetadataiTunesMetadataKeySongName ) this property seems to be quite useless. Kind regards, Gerriet. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com