Beispiel #1
0
        public async Task <double> GetVolume()
        {
            var virtualVolume = GetVirtualVolumeService();

            if (virtualVolume != null)
            {
                return(await virtualVolume.GetVolume());
            }

            if (!await Preferences.Contains(PREFERENCES_KEY_VOLUME_DUMMY))
            {
                return(Constants.VOLUME_MAX);
            }
            return(await Preferences.Get(PREFERENCES_KEY_VOLUME_DUMMY));
        }
Beispiel #2
0
        public async Task <double> GetVolume()
        {
            if (!double.IsFinite(Volume))
            {
                if (await Preferences.Contains(PREFERENCES_KEY_VOLUME))
                {
                    Volume = await Preferences.Get(PREFERENCES_KEY_VOLUME);

                    Volume = Util.Volume.Limit(Volume);
                }
                else
                {
                    Volume = Constants.VOLUME_MAX;
                }
            }

            return(Volume);
        }