Inheritance: IDisposable
        public PointCloudPlayerSource(IMotionFrameSerializer serializer)
        {
            _serializer = serializer;
            _filesToLoad = new List<string>();
            _bufferedFrames = new List<MotionFrame>();

            _loadingQueue = new WorkQueue<string>();
            _loadingQueue.Callback = LoadFrameWorker;

            Unload();

            CreatePlaybackThread();
            _soundPlayer = new SoundPlayer();
        }
        private void Dispose(bool disposing)
        {
            _isRunning = false;

            if (_soundPlayer != null)
            {
                _soundPlayer.Dispose();
                _soundPlayer = null;
            }

            if (_playbackThread != null &&
                _playbackThread.IsAlive)
            {
                _playbackThread.Join(200);

                if (_playbackThread.IsAlive)
                {
                    _playbackThread.Abort();
                }
                _playbackThread = null;
            }

            if (_loadingQueue != null)
            {
                _loadingQueue.Dispose();
                _loadingQueue = null;
            }
        }