public SampleManager GetSampleManager(ResourceStore <byte[]> store = null) { if (store == null) { return(globalSampleManager); } SampleManager sm = new SampleManager(store); AddItem(sm); sm.AddAdjustment(AdjustableProperty.Volume, VolumeSample); return(sm); }
/// <summary> /// Obtains the <see cref="SampleManager"/> corresponding to a given resource store. /// Returns the global <see cref="SampleManager"/> if no resource store is passed. /// </summary> /// <param name="store">The <see cref="T:ResourceStore"/> of which to retrieve the <see cref="SampleManager"/>.</param> public SampleManager GetSampleManager(IResourceStore <byte[]> store = null) { if (store == null) { return(globalSampleManager.Value); } SampleManager sm = new SampleManager(store); AddItem(sm); sm.AddAdjustment(AdjustableProperty.Volume, VolumeSample); VolumeSample.ValueChanged += sm.InvalidateState; return(sm); }