Prior to embedding a watermark in an audio signal, a spectral
representation of the audio signal and a spectral representation of the
watermark signal are determined. The spectral representation of the
watermark signal is then processed on the basis of a psychoacoustic
masking threshold of the audio signal. The processed watermark signal is
combined with the audio signal to obtain an audio signal bearing a
watermark. The spectral representation of the watermark signal is
processed iteratively as follows: first a predetermined watermark initial
value is selected, then the interference introduced into the spectral
representation of the audio signal after a quantization of the spectral
representation of the audio signal is determined and then, if the
interference introduced by the watermark initial value exceeds the
predetermined interference threshold, the watermark initial value is
modified progressively until the resulting interference introduced into
the spectral representation of the audio signal after quantization is
less than or equal to the predetermined interference threshold. The
modified watermark initial value at the end of the iteration is used as
the processed watermark signal to be combined with the audio signal. As a
result it is no longer possible for a watermark to be quantized out.
Instead, full control over the energy of the watermark is achieved. A
watermark can therefore be embedded in an audio signal to provide either
the best possible degree of watermark detectability or the best possible
audio quality.