fix samples number calculation for 24 and 32 bit output