private void loadSoundFiles(string[] sfxFiles, string[] musicFiles) { try { _sfxClips = new SoundClip[sfxFiles.Length]; for (int i = 0; i < sfxFiles.Length; i++) { _sfxClips[i] = new SoundClip(i, _soundRootFolder + @"SFX\" + sfxFiles[i], false); } } catch (Exception ex) { _log.ErrorFormat("Error intializing sound effects. Check that sound files in {0}\\SFX are there. {1}", _soundRootFolder, ex); } try { _musicClips = new SoundClip[musicFiles.Length]; for (int i = 0; i < musicFiles.Length; i++) { _musicClips[i] = new SoundClip(i, _soundRootFolder + @"MUSIC\" + musicFiles[i], true); } } catch (Exception ex) { _log.ErrorFormat("Error intializing music effects. Check that sound files in {0}\\Music are there. {1}", _soundRootFolder, ex); } }