Preload *.wav with SystemSoundID?

Posted by fuzzygoat on Stack Overflow See other posts from Stack Overflow or by fuzzygoat
Published on 2010-04-20T12:02:59Z Indexed on 2010/04/20 12:43 UTC
Read the original article Hit count: 325

Filed under:
|
|

I am playing a wav file to give a little audio feedback when a button in my UI is pressed. My question is when you first press the button there is a delay (about 1.5secs) whilst the sound file "sound.wav" is loaded and cached. Is there a way to pre-cache this file (maybe in my viewDidLoad)? I guess I could do it by just playing it a viewDidLoad, but would really need to disable the audio so it does not "beeb" each time the app starts.

many thanks for and help.

gary

EDIT: Looks like my question is a duplicate of this post unless anyone has any new info? Maybe a way to turn the play volume down temporarily, unless the audio is cleared each time through the run loop.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa-touch