Ejemplo n.º 1
0
        /// <summary>
        /// Given a soundfile reference in a cvf file, return the path to the sound file
        /// </summary>
        public static string SMSSoundPath(string smsfilename, string soundfile)
        {
            string smsSoundPath = Path.GetDirectoryName(smsfilename) + @"\" + soundfile;
            string globalSoundPath = MSTSPath.GlobalSoundFolder() + @"\" + soundfile;

            return File.Exists(smsSoundPath) ? smsSoundPath : globalSoundPath;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Given a soundfile reference in a wag or eng file, return the path the sound file
        /// </summary>
        /// <param name="wagfilename"></param>
        /// <param name="soundfile"></param>
        /// <returns></returns>
        public static string TrainSoundPath(string wagfilename, string soundfile)
        {
            string trainsetSoundPath = Path.GetDirectoryName(wagfilename) + @"\SOUND\" + soundfile;
            string globalSoundPath = MSTSPath.GlobalSoundFolder() + @"\" + soundfile;

            return File.Exists(trainsetSoundPath) ? trainsetSoundPath : globalSoundPath;
        }