public static void processTicks() { if (!userDeactivated) { if (Configuration.option_autopause) { if (ticksInactive == -1) //Logical part starts to run here { checkStates(); decide(); } else if (ticksInactive == 0) { //Queues are not full, so this fills the queues with their average values QueueControl.fillQueuesWithAverage(ref otherSoundQueue, ref spotifySoundQueue, ref Configuration.SPOTIFY_QUEUE_SIZE, ref currentQueueSize); ticksInactive--; } else if (ticksInactive > 0) { ticksInactive--; } } //2 ticks after pause/play, because transition is not instant which causes noise if (tickDelay == 0) { SessionOperation.processCurrentPeaks(ref otherSoundQueue, ref spotifySoundQueue); } else { tickDelay--; } } }
public static void disable() { Configuration.option_adblock = false; ad_alarm = false; FileManager.changeConfig("adblock", "0"); if (SessionOperation.sessionVolume == 0f && Configuration.option_remember) { SessionOperation.sessionVolume = 1f; } if (!Configuration.option_remember) { SessionOperation.sessionVolume = Configuration.spotify_volume / 100; } SessionOperation.changeSpotifyVolume(SessionOperation.sessionVolume); }