adrianstevens / Xamarin-Plugins

Cross-platform Plugins for Xamarin, Xamarin.Forms and Windows
https://www.nuget.org/packages/Xam.Plugin.SimpleAudioPlayer/
MIT License
132 stars 53 forks source link

Update SimpleAudioPlayerImplementation.cs #63

Closed malcolmvs closed 3 years ago

malcolmvs commented 4 years ago

Hi, there's a problem with the casting when performing a seek operation (on the Android implementation). The double value is cast to an int and then multiplied by 1000 in order to convert it to milliseconds, however, the current code truncates the position value (due to the typecast). I've corrected this by ensuring the multiplication is done using doubles & then the resultant double value is cast to an int.

Thanks!

adrianstevens commented 3 years ago

Thanks @malcolmvs!! New version coming soon