<div dir="ltr"><div>Hi</div><div>What is the best way to convert a float to int in the following please?</div><div><br></div><div>//I want to set myBuf.pos to a percentage of myBuf.samples()...</div><div>//Start playing at say 40% through the total number of samples.</div><div><br></div><div>40.0 =&gt; float pctPosInit;</div><div>pctPosInit/100*myBuf.samples() =&gt; myBuf.pos;</div><div><br></div><div><br></div><div>This throws the error argument types don&#39;t match. <br></div><div>I&#39;m not seeing how to convert the float to an int here.</div><div>Thanks for your help!</div><div><br></div><div>Micheal<br></div></div>