Example #1
0
        public void PlaySound(CachedSound input)
        {
            var samples = new CachedSoundSampleProvider(input);
            var c       = CorrectInput((ISampleProvider)samples);
            //var v = new VolumeSampleProvider(CorrectInput(input));
            var v = new VolumeSampleProvider(c);

            v.Volume = Volume;
            mixer.AddMixerInput(v);
        }
Example #2
0
        CachedSound LoadSound(string name)
        {
            //var req_samples = Resources.Options.SoundSampleRate;
            //var req_channels = Resources.Options.SoundChannels;

            var         fullPath = System.IO.Path.Combine(ResourceRoot, "sounds", name);
            CachedSound sound    = new CachedSound(fullPath);

            //sound = CorrectSoundFile(sound);
            return(sound);
        }
Example #3
0
 public CachedSoundSampleProvider(CachedSound cachedSound)
 {
     this.cachedSound = cachedSound;
 }