Beispiel #1
0
        public void PlayCachedSound(string fileName)
        {
            CachedSound cachedSound;

            if (!soundCache.ContainsKey(fileName))
            {
                cachedSound = new CachedSound(fileName);
                soundCache.Add(fileName, cachedSound);
            }
            else
            {
                cachedSound = soundCache[fileName];
            }

            PlaySound(cachedSound);
        }
Beispiel #2
0
 public void PlaySound(CachedSound sound)
 {
     AddMixerInput(new CachedSoundSampleProvider(sound));
 }
 public CachedSoundSampleProvider(CachedSound cachedSound)
 {
     this.cachedSound = cachedSound;
 }