How can I get the content (raw/sample data) of an iPod-track? I've seen apps like "Ringtone Designer" and iMovie which can do it, but I have no idea which api they use or what they do. I could imagine that iMovie uses private apis, but "Ringtone Designer" is a third-party app, so it must be possible with the public api-functions.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
I haven't done this myself but according to the documentation these are the steps (roughly):
MPMediaQuery
to retrieve one or moreMPMediaItem
objects from the iPod library.-[MPMediaItem valueForProperty: MPMediaItemPropertyAssetURL]
.AVURLAsset
from the URL.AVAssetReader
for the asset.AVAssetReaderTrackOutput
(one for each track of the asset) and add them to the asset reader with-[AVAssetReader addOutput:]
.-[AVAssetReader startReading]
.-copyNextSampleBuffer
for each of yourAVAssetReaderTrackOutput
objects until you have read all the data.See the documentation to all these classes for details.