Apparatus and methods for including a code having at least one code frequency
component in an audio signal are provided. The abilities of various frequency components
in the audio signal to mask the code frequency component to human hearing are evaluated
and based on these evaluations an amplitude is assigned to the code frequency component.
Methods and apparatus for detecting a code in an encoded audio signal are also
provided. A code frequency component in the encoded audio signal is detected based
on an expected code amplitude or on a noise amplitude within a range of audio frequencies
including the frequency of the code component.