Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

SpriteKit: Preload sound file into memory before playing?

$
0
0

Just wondering if this is possible. Currently, the first time I play a sound file while the app is running, there is a noticeable delay before the sound actually plays. After this it plays instantly without issue, but if I close the app completely and relaunch it, the delay will be back the first time the sound is played. Here is the code I'm using to play the sound:

var soundPath = @"Sounds/sound.caf";
RunAction(SKAction.PlaySoundFileNamed(soundPath, false));

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>