AFConvert and Core Audio file conversion

  • Hi

    I really need to manually convert some audio formats in my app from
    aiff to a low bit-rate mp3 or aac. I have come across afconvert which
    is bundled (along with source) with the developer tools but not
    included on a standard OS X install.

    This is unfortunate because it seems that it does exactly what I need,
    so I had the thought to bundle it inside my app package and use it
    from there. I realise I could cobble together the core audio
    frameworks to do what I want as well but why reinvent the wheel eh?

    Are there any best practices when bundling foundation tools? or event
    just information about how I might approach the bundling of a command
    line tool like this?

    Cheers
    Dave

    PS. I have checked and from the license at the top of the afconvert
    sources, it seems that it would be legal to do this.

    --
    e-mail: <dave.verwer...>
    web: http://shinydevelopment.com

    Shiny Development Ltd. is registered in England, Registration Number:
    05805802. Registered Office: 4 Claridge Court, Lower Kings Road,
    Berkhamsted, Herts., HP4 2AF.
  • On Feb 21, 2008, at 10:09 AM, Dave Verwer wrote:

    > This is unfortunate because it seems that it does exactly what I need,
    > so I had the thought to bundle it inside my app package and use it
    > from there. I realise I could cobble together the core audio
    > frameworks to do what I want as well but why reinvent the wheel eh?
    >
    > Are there any best practices when bundling foundation tools?

    Just place it in either the Contents/MacOS or Contents/Resources
    folder in your bundle & use NSBundle to get its path. It's pretty
    simple, actually...

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • Le 21 févr. 08 à 21:41, Nick Zitzmann a écrit :

    >
    > On Feb 21, 2008, at 10:09 AM, Dave Verwer wrote:
    >
    >> This is unfortunate because it seems that it does exactly what I
    >> need,
    >> so I had the thought to bundle it inside my app package and use it
    >> from there. I realise I could cobble together the core audio
    >> frameworks to do what I want as well but why reinvent the wheel eh?
    >>
    >> Are there any best practices when bundling foundation tools?
    >
    >
    > Just place it in either the Contents/MacOS or Contents/Resources
    > folder in your bundle & use NSBundle to get its path. It's pretty
    > simple, actually...
    >
    > Nick Zitzmann
    > <http://www.chronosnet.com/>

    As you ask about good practice, you should note this (from the Code
    Signing Release Notes):

    Do not put helper applications, plugins, and other separately signed
    code into the Resources directory of a bundle. The Resources directory
    is directly sealed to the main executable. Put plugins into the Plug-
    Ins directory. Put helper tools into the executable directory. Put
    helper applications (with their own bundles) into the support directory.