• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
set kAudioFilePropertyAlbumArtwork: fail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

set kAudioFilePropertyAlbumArtwork: fail


  • Subject: set kAudioFilePropertyAlbumArtwork: fail
  • From: Alex _ <email@hidden>
  • Date: Mon, 05 Aug 2013 10:37:07 +0200
  • Importance: Normal

Hello folks,

I'm struggling to set the artwork to a M4P created audio file.
I can:
- setup the converter
- create the file 
- set the cookie
- write packet into it
- set every property that's allowed to be written
- close the file 
-> listen to it (if I haven't try to set the artwork)

Unfortunately, as soon as I try to set the artwork, the AudioFileSetProperty doesn't fail, but AudioFileClose does.
Specifically I get: +[NSConcreteData bytes]: unrecognized selector sent to class

        ...
        NSData *image = [NSData dataWithContentsOfFile:@"/tmp/test.jpg"];
        if (image != NULL)
        {
            checkError("AudioFileSetProperty",
                       AudioFileSetProperty(audioID,
                                            kAudioFilePropertyAlbumArtwork,
                                            (UInt32)[image length],
                                            CFBridgingRetain(image)));
        }
        
        checkError("AudioFileClose",
                   AudioFileClose(audioID));
        ...

image is a regular JPEG picture. 

This error happens in the AudioFileClose context. 

I also tried to overcome the problem by using AVAssetExportSession, but instead of failing, the cover isn't written as a metadata. 

Do you have any idea?
Thank you very much
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: set kAudioFilePropertyAlbumArtwork: fail
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Truncating an audio file
  • Next by Date: Audio Unit: BusCountWritable Problem
  • Previous by thread: Re: Truncating an audio file
  • Next by thread: Re: set kAudioFilePropertyAlbumArtwork: fail
  • Index(es):
    • Date
    • Thread