Playing mp3s from Cocoa

  • I'd like to play mp3 files (including seeking, pause/resume) from a
    Cocoa application. After some research I found a couple libraries
    (MTCoreAudio, Sycamore, Musikit, mpg123) and there is of course also
    Quicktime (NSMovieView is deprecated?). Any suggestion on what is
    most easy to use? Sometimg non-GPL/copyleft would be preferred. Any
    pointers?

    cheers
    --
    Torsten
  • This is a FAQ. The easiest solution is QuickTime as it's part of OS
    X and easily accessed from Cocoa. Read the documentation for details.

    --
    I.S.

    On Sep 7, 2007, at 9:01 PM, Torsten Curdt wrote:

    > I'd like to play mp3 files (including seeking, pause/resume) from a
    > Cocoa application. After some research I found a couple libraries
    > (MTCoreAudio, Sycamore, Musikit, mpg123) and there is of course also
    > Quicktime (NSMovieView is deprecated?). Any suggestion on what is
    > most easy to use? Sometimg non-GPL/copyleft would be preferred. Any
    > pointers?
  • --- Torsten Curdt <tcurdt...> wrote:

    > I'd like to play mp3 files (including seeking,
    > pause/resume) from a
    > Cocoa application. After some research I found a
    > couple libraries
    > (MTCoreAudio, Sycamore, Musikit, mpg123) and there
    > is of course also
    > Quicktime (NSMovieView is deprecated?). Any
    > suggestion on what is
    > most easy to use?

    If you're targeting 10.4 and above, take a look at
    QTKit.
    http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgramm
    ingGuide/index.html


    Cheers,
    Chuck


    ____________________________________________________________________________________
    Pinpoint customers who are looking for what you sell.
    http://searchmarketing.yahoo.com/
  • Hey Charles,

    Thanks for the pointer - that was pretty straight forward to
    implement. :) The only thing I could not yet get working was binding
    a custom slider to the QTMovie. (I don't want to have the standard QT
    control in the UI). But slowly polling the movie and updating the UI
    via NSTimer did the trick. Probably not the most elegant solution
    though.

    Still I would love to learn how one would do this without
    QT ...decoding with the various codec libraries and then passing it
    on to CoreAudio. If someone has pointers to examples for
    that ...please let me know. I am still going through the documentation.

    cheers
    --
    Torsten

    On 08.09.2007, at 03:39, Charles Steinman wrote:

    > --- Torsten Curdt <tcurdt...> wrote:
    >
    >> I'd like to play mp3 files (including seeking,
    >> pause/resume) from a
    >> Cocoa application. After some research I found a
    >> couple libraries
    >> (MTCoreAudio, Sycamore, Musikit, mpg123) and there
    >> is of course also
    >> Quicktime (NSMovieView is deprecated?). Any
    >> suggestion on what is
    >> most easy to use?
    >
    > If you're targeting 10.4 and above, take a look at
    > QTKit.
    > http://developer.apple.com/documentation/QuickTime/Conceptual/
    > QTKitProgrammingGuide/index.html
    >
    > Cheers,
    > Chuck
    >
    >
    >
    > ______________________________________________________________________
    > ______________
    > Pinpoint customers who are looking for what you sell.
    > http://searchmarketing.yahoo.com/
  • On Fri, 7 Sep 2007 18:39:08 -0700 (PDT), Charles Steinman
    <acharlieblue...> said:
    > If you're targeting 10.4 and above, take a look at
    > QTKit.
    > http://developer.apple.com/documentation/QuickTime/Conceptual/
    > QTKitProgrammingGuide/index.html

    The presence of QTKit is a function of what version of QuickTime is
    installed, not what version of the System is being used. From the very page
    you cited: "The framework also supports applications running in Mac OS X
    v10.3..." m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
    AppleScript: the Definitive Guide - Second Edition!
    <http://www.amazon.com/gp/product/0596102119>
  • Torsten,

    Look at the examples in file:///Developer/Examples/CoreAudio
    The SimpleSDK looks like what you want, specifically the PlayFile class.

    Good luck and let us know how you implement your sound playing.
    Perhaps you'll release a small audio file playing class? ;-)

    Peace, Alan

    --
    My blog: cocoalatte.info

    // Things I've said -------------------------
    "Maturity resides in the mind."
    "Silence is the Universe's greatest gift."
    "When the World realizes that personal beliefs are not something to
    argue or fight over, it shall evolve."
  • On 10.09.2007, at 14:11, Alan Smith wrote:

    > Torsten,
    >
    > Look at the examples in file:///Developer/Examples/CoreAudio
    > The SimpleSDK looks like what you want, specifically the PlayFile
    > class.

    Thanks, Alan!

    > Good luck and let us know how you implement your sound playing.
    > Perhaps you'll release a small audio file playing class? ;-)

    I am still a bloody beginner in the Cocoa world. Trying to get my
    head around in all different areas atm.
    ...but as an open source type of guy it will be just a matter of time
    until I'll contribute back :)

    cheers
    --
    Torsten
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today