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); }
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); }
public CachedSoundSampleProvider(CachedSound cachedSound) { this.cachedSound = cachedSound; }