Thanks for the PR, a couple comments:
Use just int, float, etc in new code, instead of gint or SfiInt.
This should be "as<BseSong*>", without the extra space.
You're saving an old value here for comparing later. There's no need to keep this a variable, i.e. please make that const in similar code in the future: