AAC encoder: check for NaNs/inf in TNS gain