/// <summary> /// 私有的构造器 /// </summary> private Musician() { this.BassEngine = BassPlayer.GetInstance(); this.musicianTimer = new Timer(1000); this.musicianTimer.Elapsed += musicianTimer_Elapsed; this.BGSDefaultVolume = 800; this.bgmVolume = 800; this.VocalDefaultVolume = 1000; this.seVolume = 1000; this.Reset(); }
/// <summary> /// 工厂方法:获得Bass音频引擎的唯一实例 /// </summary> /// <returns>Bass音频引擎</returns> public static BassPlayer GetInstance() { return BassPlayer.instance == null ? BassPlayer.instance = new BassPlayer(null) : BassPlayer.instance; }