SFML community forums
Help => Audio => Topic started by: kileyi on January 08, 2019, 05:19:38 am
-
Got trouble using this function.
This function requires TimeSpan,and TimeSpan requires Time.
And Time can't pass number direct into it.
Like float start = 1.807;
float loop = 3.371;
So how can I pass time to it?Any example?
-
Have you read the documentation and tutorials first?
-
Yes,I think I have read some of them about audio part,I didn't find anything about this function.
And the API document does not give any example how to use this.
Just some useless parameter shown same as Visual Studio tip does.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Music.php#ae7b339f0a957dfad045f3f28083a015e
And I have tried google,no example.
So I hope to get some example here.
========================================
OK, never mind.I was stupid.I thought sf::Time shoud use like sf::Time(1.807) or something like this.
Turns out it is sf::seconds(1.807) which is sf::Time type.
Not what I was expected this is working this way.
-
Yes, I meant documentation about sf::Time, obviously ;)
Glad that you made it work.