TheEGC Guest |
Quote
|
2013-02-27 16:10:10 |
|
A quick question;
If I want to preload a sound by using ISoundSource and the n make the program wait for it to successfully loaded before going through the rest of the code (so I can call for ISound.Play2D directly after... How should I do it?
I'm very new when it comes to programming, so this might have an obvious and easy solution... But I really need to make it preload so that I can sync it together with the rest of the program. Any simple code-example would do great, thanks in advance!
|
niko Moderator |
Quote
|
2013-02-28 08:49:24 |
|
Yes, irrKlang only loads files if necessary. So basically when you play it the first time. There is a 'preload' flag in the addSoundSourceFromFile method. If you set it to true, the file is loaded already with the addSoundSourceFromFile() call.
|