Closed ACrazyTown closed 1 month ago
can you walk me through what the existing field volumeHandler
is, and how it was intended to be used? This is the first time I'm coming across it
can you walk me through what the existing field
volumeHandler
is, and how it was intended to be used? This is the first time I'm coming across it
volumeHandler
is just a function callback that gets called whenever the global volume is changed. It's meant to be replaced by your own function like this:
FlxG.sound.volumeHandler = function(volume:Float) {
// do something when the volume is changed
};
Not sure what other use cases there might be but I personally used it to get openfl.media.Video
to play nicely with Flixel's sound system
Should we deprecate it?
Should we deprecate it?
I don't see why not
It's still giving deprecation warnings:
SoundFrontEnd.hx:343: characters 7-20 : Warning : volumeHandler is deprecated, use onVolumeChange, instead SoundFrontEnd.hx:345: characters 4-17 : Warning : volumeHandler is deprecated, use onVolumeChange, instead SoundFrontEnd.hx:466: characters 7-20 : Warning : volumeHandler is deprecated, use onVolumeChange, instead SoundFrontEnd.hx:468: characters 4-17 : Warning : volumeHandler is deprecated, use onVolumeChange, instead
I'll have to mess with this locally, when i have time later, unless you can figure it out, first
I don't seem to be getting any deprecation warnings. I tried building the TurnBasedRPG demo on hl & html5, debug and release. Uncommenting the fix you added makes them show up, otherwise I get nothing
I was looking at the 4.2.5 job, which doesn't have the ability to suppress warnings in methods. it does seem to work fine on 4.3.3
info: #3147
This acts the same as volumeHandler except it's just a FlxSignal. Not sure what to do with volumeHandler, should it be marked as deprecated?