internal AudioPlayable(IAudio audio, IAudioStorage storage, IWebDownloader downloader, Uri url) { __Audio = audio; __Storage = storage; __Downloader = downloader; __Url = url; __BassFileProcs = new BASS_FILEPROCS(user => { }, user => __CacheStream.AudioSize, BassReadProc, (offset, user) => true); __EndStreamProc = (handle, channel, data, user) => { __RequestTasksStop = true; CleanActions(); OnAudioNaturallyEnded(); }; if (storage.CheckCached(audio)) { DownloadedFracion = 1.0; } }
public TrackFileQueryHandler( IRepository <Entities.Track> repository, IAudioStorage audioStorage ) { this._repository = repository; this._audioStorage = audioStorage; }
public AudioInfoCacheOnlyProvider(AudioInfo.AudioInfoFactory infoFactory, IAudioStorage cache, long userId, PlayingStateChangedEventHandler optionalStateChangedHandler = null) { __InfoFactory = infoFactory; __Cache = cache; __UserId = userId; __OptionalStateChangedHandler = optionalStateChangedHandler; }
public UploadFileCommandHandler( IMediator mediator, IAudioUploadingMessageBroker audioUploadingMessageBroker, IAudioStorage audioStorage ) { this._mediator = mediator; this._audioUploadingMessageBroker = audioUploadingMessageBroker; this._audioStorage = audioStorage; }
internal AudioPlayableMediator(IAudioStorage storage, IWebDownloader downloader, IAudio audio, Uri url) { __InternalPlayable = new AudioPlayable(audio, storage, downloader, url); __InternalPlayable.DownloadedFracionChanged += OnPercentsDownloadedChanged; __InternalPlayable.AudioNaturallyEnded += WhenStop; __Duration = audio.Duration; __PlaybackTimer.Elapsed += (sender, args) => OnSecondsPlayedChanged(); __PlaybackTimer.AutoReset = true; }
private AudioInfo(IAudioStorage storage, IWebDownloader downloader, long audioId, long userId, string title, string artist, int duration, int index, Uri url) { __AudioId = audioId; __UserId = userId; __Title = title; __Artist = artist; __Duration = duration; __Index = index; __Playable = new AudioPlayableMediator(storage, downloader, this, url); }
public AudioInfoFactory(IAudioStorage storage, IWebDownloader downloader) { __Storage = storage; __Downloader = downloader; }
public Account(IFileStorage storage) { __AudioStorage = new CacheStorage.CacheStorage(storage); }