Same lock sounds for any missile types.
From my understanding and experience, ECM is meant to break up an attempted lock in the process, or a lock that's already been made, if missiles haven't been launched yet.
Flares are for incoming heat seekers that have already been launched, but they also break up a lock before the full lock on. I'm not sure they're effective against laser guided munitions, I've guided shelled a bunch of choppers that popped their flares after my shell was out of the gun.
My rule of thumb (in a chopper, because that's all I fly) is to always carry ECM as pilot and have a gunner with flares. As soon as someone starts to lock (slow beeping tone), I count to 3, pop ECM. That's before the actual lock (solid tone) happens. That gives me roughly 5-7 seconds before they can start locking again, and I normally do that counting to 3 before ECM so that I could finish a rocket strafe if I'm in the middle of one.
On the other side of the lock, once that lock happens and missile launches (fast beeping tone), gunner pops flares. We're usually safe if I evade after flares, although it seems hit or miss sometimes when we're locked by soflam, which makes sense because flares aren't meant to decoy laser guided munitions. Annoying though that lately, I've been getting frequent silent jav kills with no indications of any locks.
ECM saves me from getting killed AFTER missile launch only with laser guided munitions, and not every time because javelins still manage to one shot me. Heatseekers still hit me even with ECM if they've already been launched. It seems like some of the mechanics of missile decoy/evasion are a little rough.