• 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
Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference


  • Subject: Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference
  • From: elliott cable <email@hidden>
  • Date: Mon, 9 Feb 2009 06:56:09 -0900

I'm sort of new to Cocoa, and C - as a learning project, I'm trying to
write a very simple music/MP3 player.

Currently, I'm stuck on getting MP3 data into the application and,
well, playing it audibly. I've got a simple "Cocoa Document-based
Application" template created, and have a simple UI that allows me to
'play' files: <http://github.com/elliottcable/farrier/blob/bbb0b3f582cf072618b684cac8f3c8eb2caacbde/MyDocument.m#L38-45>

After a few days beating my head against that snippet, and trying to
figure out why it failed to actually play any file that wasn't a
simple .mov file, I found this old thread on this list:
<http://lists.apple.com/archives/QuickTime-Users/2008/Nov/msg00026.html>

I was excited, because it seemed to be the same problem as mine -
playing anything that isn't .mov using QTKit. Unfortunately, after
changing my code, I still have the same problem.

Here's my latest attempt at the source of that method:
<http://gist.github.com/60817#LID2> Unfortunately, that only prints
the following to the log, and shows me this:
<http://tr.im/ffgg?grabup>

2009-02-09 06:48:58.332 Farrier[3370:10b] MyDocument -readFromData:
ofType:public.mp3 error:Error Domain=NSOSStatusErrorDomain Code=-1856
"Operation could not be completed. (OSStatus error -1856.)" (handler
not found )]

Does anybody have any experience with opening and playing MP3 files in
Cocoa with QTKit? (Or, for that matter, anything — I'm struggling at
this point!)

Help is greatly appreciated (-:

--
~ elliottcable
http://elliottcable.name || email@hidden || +1.919.636.4204
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference
      • From: Kyle Sluder <email@hidden>
    • Re: Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference
      • From: Michael Ash <email@hidden>
  • Prev by Date: Re: NSTextField - dynamic resizing while editing
  • Next by Date: Re: CGFloat and 64 Bit
  • Previous by thread: Re: Sketch.app / SKTText (was Re: NSTextField - dynamic resizing while editing)
  • Next by thread: Re: Reading MP3 data into a NSDocument using QTKit, -readFromData:, and QTDataReference
  • Index(es):
    • Date
    • Thread