Does it load the entire file at a time? Or does it act lazy and load a chunk at a time? I’m primarily interested in knowing how much memory my audio uses.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From what I understand of it, it buffers the file and you can have even more control over this process by using Audio Queues. Most implementations of OpenAL will load the entire file all at once which can be pretty intensive.
You can pre-buffer using
prepareToPlaybut honestly, I’ve never had any noticeable lag using wav’s, caff’s or mp4’s. Calling theplaymethod has to pre-buffer the audio anyways.In all of my uses of AVAudioPlayer, it normally only causes a temporary jump in memory allocation. As long as you release the player after it is finished, memory isn’t a problem. I’ve played as many as 15 sounds at once and never had issue.
More info on audio: http://developer.apple.com/iphone/library/documentation/iphone/conceptual/iphoneosprogrammingguide/AudioandVideoTechnologies/AudioandVideoTechnologies.html