Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Increase Refresh speed

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
joveaaron
Posts: 1
Joined: November 9th, 2024, 1:18 am

Increase Refresh speed

Post by joveaaron »

Hi. I made my own C# Plugin that fetches the information of any media playing in Windows 10/11 using .net standard 2.0. Inside the plugin LCDSmartie class the

Code: Select all

int GetMinRefreshInterval()
function is set to always return 300 (milliseconds). My code runs very quickly as it's mostly just a series of if's and math operations with easy string manipulation. The problem is that the media position counter updates once every ~5 seconds and I can't find a way to speed it up anywhere. I want to make it so it updates at least once per second so I can show the counter changing in 'real time'. It is not scroll speed. That is fine the way it is right now. I kinda need it to update quickly so I can debug it faster lol.

Hope you can help me out here and once I finish the code I WILL add a post right here with a link to the project code and precompiled binaries :D

Small teaser (using Spotify as an example):
Image

Thanks,
Aarón

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Re: Increase Refresh speed

Post by limbo »

Nice plugin.
The value of GetMinRefreshInterval can be set as low as you like. I suggest to set it to 20 as the lowest valaue to avoid issues.

Code: Select all

// Define the minimum interval that a screen should get fresh data from our plugin.
// The actual value used by Smartie will be the higher of this value and of the "dll check interval" setting
// on the Misc tab.  [This function is optional, Smartie will assume 300ms if it is not provided.]
// 
public int GetMinRefreshInterval()
{
	return 20; // 20 ms (around 50 times a second)
}
There is another limitation on the program interface which can limit the data coming from plugins called DLL check interval. This should be set as low as required but still ny opinion is to keep it above 20
dll update interval.png
Please let me know if this helps.
You do not have the required permissions to view the files attached to this post.

Post Reply