amirchev / OBS-Lyrics

Manage and display lyrics to any text source in your OBS scene.
Apache License 2.0
27 stars 17 forks source link

Dc strato #7

Closed DCStrato closed 3 years ago

DCStrato commented 3 years ago

Added a flag to possibly prevent timer callback recursion. Not sure if OBS handles this. Tried digging through OBS source but didn't see it. If the callback takes longer than the 100ms then it could hangup OBS. I think this may have happened a few times when the source function has to load lyrics from a file. There is an OBS lockup but no crash report and a scene with a load lyrics was the last accessed according to the log. Testing showed repeated loading of Lyric A scene then Lyric B scene would eventually cause this. After the recursion lockout I have not been able to repeat the lockup. Testing will continue as always.

More code added selfishly for my own tech team managing lyrics. This Sunday had some strange verse options the following helped clean up.

Added ##B in addition to ##P (tech team kept wanting to use B for Blank Line and I had to agree) Added #B:n and #P:n to repeat a blank line n times Added #R:ntext where the #R:n preceding text, repeats the text n times (saves some space with repetitive verses)

Optimized the "prepare_lyrics" function to better manage ### and coded blanks and repeats.