public SoundInstance CreateSoundInstance() { var instance = new SoundInstance(this); Add(instance); return instance; }
internal void RaiseStopEvent(SoundInstance instance) { if (OnStop != null) OnStop(instance); }
internal void RaisePlayEvent(SoundInstance instance) { if (OnPlay != null) OnPlay(instance); }
internal void Add(SoundInstance instanceToAdd) { if (createInternalInstance) internalInstances.Add(instanceToAdd); else externalInstances.Add(instanceToAdd); createInternalInstance = false; CreateChannel(instanceToAdd); }
public abstract void StopInstance(SoundInstance instanceToStop);
public override void StopInstance(SoundInstance instanceToStop) { playingInstances.Remove(instanceToStop); }
public abstract bool IsPlaying(SoundInstance instance);
protected abstract void RemoveChannel(SoundInstance instanceToRemove);
protected abstract void CreateChannel(SoundInstance instanceToFill);
public abstract void PlayInstance(SoundInstance instanceToPlay);
public override bool IsPlaying(SoundInstance instance) { return playingInstances.Contains(instance); }
protected override void RemoveChannel(SoundInstance instanceToRemove) { }
protected override void CreateChannel(SoundInstance instanceToFill) { }
internal void Remove(SoundInstance instanceToRemove) { internalInstances.Remove(instanceToRemove); externalInstances.Remove(instanceToRemove); RemoveChannel(instanceToRemove); }
public SoundInstance CreateSoundInstance() { var instance = new SoundInstance(this) { Volume = Settings.Current.SoundVolume }; Add(instance); return instance; }
public override void PlayInstance(SoundInstance instanceToPlay) { playingInstances.Add(instanceToPlay); }