  In this paper, we study the asymptotic behavior of the normalized cadlag
functions generated by the discrete Fourier transforms of a stationary centered
square-integrable process, started at a point.
  We prove that the quenched invariance principle holds for averaged
frequencies under no assumption other than ergodicity, and that this result
holds also for almost every fixed frequency under a certain generalization of
the Hannan condition and a certain rotated form of the Maxwell and Woodroofe
condition which, under a condition of weak dependence that we specify, is
guaranteed for a.e. frequency. If the process is in particular weakly mixing,
our results describe the asymptotic distributions of the normalized discrete
Fourier transforms at every frequency other than $0$ and $\pi$ under the
generalized Hannan condition.
  We prove also that under a certain regularity hypothesis the conditional
centering is irrelevant for averaged frequencies, and that the same holds for a
given fixed frequency under the rotated Maxwell and Woodroofe condition but not
necessarily under the generalized Hannan condition. In particular, this implies
that the hypothesis of regularity is not sufficient for functional convergence
without random centering at a.e. fixed frequency.
  The proofs are based on martingale approximations and combine results from
Ergodic theory of recent and classical origin with approximation results by
contemporary authors and with some facts from Harmonic Analysis and Functional
Analysis.
