1. A method of operating a device to generate a target sound that is audible to a user of the device, the method comprising: measuring background noise in an environment in which the device is located; using a perceptual loudness model to predict an audibility of the target sound to the user of the device in the presence of the measured background noise, said step comprising using the perceptual loudness model to compute a perceived loudness of the target sound from the measured background noise and a composite signal formed by adding the source signal for the target sound to the measured background noise; using an output of the perceptual loudness model to determine a gain value that is to be applied to a source signal used to generate the target sound in order to provide at least a desired level of audibility of the target sound to the user; applying the determined gain value to the source signal to produce a modified source signal; and generating the target sound using the modified source signal.