won't the * and / get evaluated in left to right order because they have equal precedence?
Maybe but it would be better to spell it out by using brackets, they don't add any penalty and they make it explicit what you want to do.
r =( (long)rn * (long)audio)/1024;
But in this case with a 50mS delay we are not in any hurry and the extra time for a floating point operation will not be a handicap.