public SoundPlayer([NotNull] IAudioEngine engine, [NotNull] IAppContext appContext) { if (engine == null) { throw new ArgumentNullException("engine"); } if (appContext == null) { throw new ArgumentNullException("musicLibrary"); } _engine = engine; _appContext = appContext; _channelGroup = _engine.CreateGrouping("sound"); }
public MusicPlayer([NotNull] IAudioEngine engine, [NotNull] IAppContext appContext) { if (engine == null) { throw new ArgumentNullException("engine"); } if (appContext == null) { throw new ArgumentNullException("appContext"); } _engine = engine; _appContext = appContext; _channelGroup = _engine.CreateGrouping("music"); _updateTimer = Observable.Interval(TimeSpan.FromMilliseconds(UpdateInterval), _engine.Scheduler).Do(_ => Update()); }