/// <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="IResourceStore{T}"/> 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 += e => sm.InvalidateState(e.NewValue);

            return(sm);
        }