sonic: replace some float by integers to improve platform independance

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
sonic: replace literal numbers by sizeof()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>