Ask a Question
Advertise on boostr.in
is it possible to change the currentplaybackrate in 0 01 intervals using swift p using -'swift'
is it possible to change the currentplaybackrate in 0 01 intervals using swift p ¬†using -'swift'
I have been trying to use a variable that ranges from 0.8 to 1.2 at +/- 0.01 ¬†Float intervals to change the currentPlaybackRate of MPMusicPlayerController (by pressing a button).
player2?.currentPlaybackRate = rate
(where rate can equal: 0.80, 0.81, 0.82, ... 1.18, 1.19, 1.20).
I have noticed during playing the music that the rate of music only really changes when the rate value reaches 0.8, 0.9, 1.0, 1.1, and 1.2. I assume that this has to do with the the decimal place of the float.
Am I right? Is it possible to be able to change the the rate of the currentPlaybackRate at 0.01 intervals in the code? I really would like to control the music at a 1% interval speed.
Sep 7, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please