I have this:
MediaPlayer[] sounds = new MediaPlayer[40];
private void LoadSamples()
{
for (int i = 0; i < sounds.Length; i++)
{
try { sounds[i].Open(new Uri([my path here])); } catch { }
}
}
This code works as it should, BUT during the loop (when the sounds are opened) these sounds are played in the program and I don't need this to happen. How can I fix this?