  Trefftz methods are high-order Galerkin schemes in which all discrete
functions are elementwise solution of the PDE to be approximated. They are
viable only when the PDE is linear and its coefficients are piecewise constant.
We introduce a 'quasi-Trefftz' discontinuous Galerkin method for the
discretisation of the acoustic wave equation with piecewise-smooth wavespeed:
the discrete functions are elementwise approximate PDE solutions. We show that
the new discretisation enjoys the same excellent approximation properties as
the classical Trefftz one, and prove stability and high-order convergence of
the DG scheme. We introduce polynomial basis functions for the new discrete
spaces and describe a simple algorithm to compute them. The technique we
propose is inspired by the generalised plane waves previously developed for
time-harmonic problems with variable coefficients; it turns out that in the
case of the time-domain wave equation under consideration the quasi-Trefftz
approach allows for polynomial basis functions.
