We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 180ca33 commit 886bd81Copy full SHA for 886bd81
SoundSwitch.Common/Framework/Audio/Icon/AudioDeviceIconExtractor.cs
@@ -28,7 +28,7 @@ public class AudioDeviceIconExtractor
28
29
private static readonly IMemoryCache IconCache = new MemoryCache(new MemoryCacheOptions
30
{
31
- SizeLimit = 3200
+ SizeLimit = 500
32
});
33
34
private static string GetKey(MMDevice audioDevice, bool largeIcon)
@@ -72,7 +72,7 @@ public static System.Drawing.Icon ExtractIconFromPath(string path, DataFlow data
72
}
73
using var entry = IconCache.CreateEntry(key);
74
entry.SetValue(icon)
75
- .SetSize(icon.Size.Height)
+ .SetSize(largeIcon? 2 : 1)
76
.SetSlidingExpiration(TimeSpan.FromMinutes(30))
77
.SetPriority(largeIcon ? CacheItemPriority.High : CacheItemPriority.Low)
78
.RegisterPostEvictionCallback((o, value, reason, state) =>
0 commit comments