flixel
flixel copied to clipboard
Enhancement: Implement pitch and speed variables for FlxSound
I really don't know how difficult this would be to add, but it would be useful for saving storage space and just generally a helpful tool for game development.
I think that what really depends it is on lime to add a solid Pitch changing thing. ninjamuffin made a PR about setting the pitch in html5 and Desktop, And I made a PR today about some rough code with changing the timer when the pitch is changed.
it could be possible, of course! but it would require some tweaking and stuff
The requisite commit (https://github.com/openfl/lime/commit/e6674ba1791284ed530bce71c343d7103a5b802b) has been merged, so this feature is feasible to implement into Flixel 5.0.
https://github.com/HaxeFlixel/flixel/pull/2564 it's expected for 5.0.0, but it's not a breaking change so it can happen any time. not sure when lime will release the change
I believe this issue should be closed since #2564 was merged
I don't see any option for playback speed unless I am missing something
I believe this issue should be closed since #2564 was merged
true
I don't see any option for playback speed unless I am missing something
i believe that changing the pitch changes the playback speed.
funnySound.pitch = 2;
Would double the pitch, so the sound will place twice as fast, since really changing the pitch sorta just "squishes" the sound wave. At least I believe that's how sound works hehehe (peep dis one: https://youtu.be/i09V6SkVkz8)