Exemplo n.º 1
0
        protected virtual bool GetDrive(out int drive)
        {
            var outputStream = this.PlaybackManager.CurrentStream;

            if (outputStream == null)
            {
                drive = default(int);
                return(false);
            }
            var id    = default(string);
            var track = default(int);

            return(BassCdStreamProvider.ParseUrl(outputStream.FileName, out drive, out id, out track));
        }
Exemplo n.º 2
0
        public Task <IEnumerable <MetaDataItem> > GetMetaData(string fileName)
        {
            var drive = default(int);
            var id    = default(string);
            var track = default(int);

            if (!BassCdStreamProvider.ParseUrl(fileName, out drive, out id, out track))
            {
                //TODO: Warn.
#if NET40
                return(TaskEx.FromResult(Enumerable.Empty <MetaDataItem>()));
#else
                return(Task.FromResult(Enumerable.Empty <MetaDataItem>()));
#endif
            }
            var metaData = new List <MetaDataItem>();
            metaData.AddRange(this.Strategy.GetMetaDatas(track));
            metaData.AddRange(this.Strategy.GetProperties(track));
#if NET40
            return(TaskEx.FromResult <IEnumerable <MetaDataItem> >(metaData));
#else
            return(Task.FromResult <IEnumerable <MetaDataItem> >(metaData));
#endif
        }