Hello everyone
In relation with this topic, I figured out that my solution was not correct because the SoundEffectInstance
seems to be played on another thread, and I compute the current sound time in each frame of the main thread, which can give me a wrong one.
The idea would be to retrieve the current time directly from the SoundEffectInstance
, but there is no method for that in this class actually. But looking at the code on Github (here), it appears that there is a way to get the Sound
instance used. And the Sound
class has a getter for current time! (here)
This code is here since 7 years, but what I was looking for from the beginning was a fork of MonoGame, and the SoundEffectInstance
doesn’t have a way to retrieve the Sound
instance anymore (here).
Do you know why we can’t do this anymore? Is there a way to do what I want?
Thanks in advance