core audio guidance / primer

前端 未结 2 513
醉话见心
醉话见心 2021-02-06 16:43

I\'ve being doing some reading up on core audio for ios 4 with the aim of building a little test app.

I\'m pretty confused at this point in reseach with all the api\'s.

2条回答
  •  梦如初夏
    2021-02-06 16:59

    There extendedaudiofile and audio file. These seem to be the one's for extracting audio. Which one should I use?

    Neither of those would work if you are accessing audio files stored in the iPod library. You will have to use AVAssetReader. (Note: in the AVAssetReader documentation.. it states that AVAssetReader is not intended for use with real-time sources, and its performance is not guaranteed for real-time operations. All I can say that it worked fine for me.. and I've created several real time applications using just AVAssetReader.. here is a sample.

    Please see my answer here for more general tips on iOS audio programming as well.

    Finally, the book learning core audio is obviously released by now. I strongly recommend you patiently go through the chapters and play with the sample code.. It's best you take your time with the examples and have the concepts sink in before you jump your more complex scenario.. copying and pasting sample code from the web and/or following high level advice of people on the web may work at the beginning, but you'll get into really hairy problems later on that no one else will help you fix.. trust me I learned the hard way!

提交回复
热议问题