A method for upsampling a digital audio signal is described. The method includes receiving a first digital audio signal including samples and having a first sampling rate. The method also includes outputting at least one sample from the first digital audio signal as part of a second digital audio signal, the second digital audio signal having a desired second sampling rate, the second sampling rate being higher than the first sampling rate. The method also includes incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal. The method also includes, when the counter exceeds a threshold number, inserting at least one synthetic sample as part of the second digital audio signal. The method also includes repeating the outputting, incrementing, and inserting until all the samples in the first digital audio signal have been output.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of application Ser. No. 10/109,479 filed Mar. 28, 2002, now U.S. Pat. No. 6,509,850 which was a continuation of application Ser. No. 09/919,541 filed Jul. 31, 2001, which issued as U.S. Pat. No. 6,396,421 on May 28, 2002.
Audio data decoded in an MPEG system to be stored in a storage unit is supplied to an audio output via a filtering processing. For performing the filtering processing, presentation time interval of respective audio data is changed to conform to a user's designated playback speed, and the decoded audio data stored in the storage unit by being synchronized with the changed presentation time interval is written on an input queue in the set unit. A TSM algorithm is performed in the frame unit with respect to the audio data of the input queue to decrease the quantity of the audio data when the designated playback speed is faster than a normal playback speed or to increase it when the designated playback speed is slower than the normal playback speed, in accordance with a value of the designated playback speed. The TSM audio data is transferred to a middle queue. With respect to the audio data of the middle queue, up-sampling or down-sampling is performed in accordance with the value of the designated playback speed. The quantity of the audio data after the sampling becomes substantially the same as that of the decoded audio data, and thus the sampled audio data have a tone substantially identical to that of the normal playback speed and are transmitted to an output queue. The audio data stored in the output queue is synchronized with the changed presentation time interval to be transmitted to the storage in the set unit, and then is reproduced via an audio output.
A sample rate conversion is accomplished by presenting to a numerically controlled oscillator (NCO) register a clock input at the desired output rate; first-modifying the NCO register contents responsive to a first factor; determining when the first modified NCO register contents are in a predetermined range and in response to the first modified NCO register contents not being in the predetermined range, presenting the first modified NCO register contents to the input of the NCO register; second-modifying, responsive to a second factor, the first modified NCO register contents when the first modified NCO register contents are within the predetermined range and presenting it to the input of the NCO register; and fetching samples, in response to the first-modified NCO register contents being in the predetermined range and interpolating them to produce a resultant sample value at the output rate, and in response to the contents not being in the predetermined range to interpolate the previous sample to produce a resultant sample value at the output rate.