Method and system for sampling rate conversion in digital audio applications
First Claim
1. A method of upsampling a digital audio signal, comprising:
- (a) receiving a first digital audio signal including samples and having a first sampling rate;
(b) 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;
(c) incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal;
(d) when the counter exceeds a threshold number, inserting at least one synthetic sample as part of the second digital audio signal; and
(e) repeating (b), (c), and (d), until all the samples in the first digital audio signal have been output.
4 Assignments
0 Petitions
Accused Products
Abstract
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.
134 Citations
29 Claims
-
1. A method of upsampling a digital audio signal, comprising:
-
(a) receiving a first digital audio signal including samples and having a first sampling rate;
(b) 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;
(c) incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal;
(d) when the counter exceeds a threshold number, inserting at least one synthetic sample as part of the second digital audio signal; and
(e) repeating (b), (c), and (d), until all the samples in the first digital audio signal have been output. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
determining the at least one synthetic sample as a function of a pair of samples of the first digital audio signal between which the at least one synthetic sample is inserted.
-
-
4. The method according to claim 3, wherein determining the at least one synthetic sample includes interpolating a value between the pair of samples of the first digital audio signal between which the at least one synthetic sample is inserted.
-
5. The method according to claim 3, wherein determining the at least one synthetic sample is accomplished without using floating point operations.
-
6. The method according to claim 1, wherein the second sampling rate is not an integer multiple of the first sampling rate.
-
7. The method according to claim 1, wherein when the counter is incremented, it is incremented by a value that is a function of the ratio of the second sampling rate to the first sampling rate.
-
8. The method according to claim 1, further comprising
adjusting the counter when the synthetic sample is output. -
9. The method according to claim 8, wherein adjusting the counter includes subtracting the threshold value from the counter.
-
10. The method according to claim 1, wherein the second digital audio signal is the same length as the first digital audio signal.
-
11. The method according to claim 1, further comprising:
if the second sampling rate is at least twice the first sampling rate, outputting a predetermined number of additional synthetic samples for each sample from the first digital audio signal that is output in (b).
-
12. The method according to claim 11, wherein the predetermined number is a function of the integer floor of the ratio of the second sampling rate to the first sampling rate.
-
13. The method according to claim 1, wherein the counter is incremented before the at least one sample from the first digital audio signal is output as part of the second digital audio signal.
-
14. A system comprising:
-
a counter;
a threshold; and
an upsampling mechanism, the upsampling mechanism configured (a) to receive a first digital audio signal including samples and having a first sampling rate, (b) to output 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 desired second sampling rate being greater than the first sampling rate, (c) to increment the counter for each sample from the first digital audio signal that is output as part of the second digital audio signal in (b), (d) when the counter exceeds the threshold, to insert at least one synthetic sample as part of the second digital audio signal, and (e) to repeat (b), (c), and (d) until all samples in the first digital audio signal have been output.
-
-
15. An article of manufacture comprising a computer-readable medium having stored thereon instructions adapted to be executed by a processor, the instructions which, when executed, define a series of steps to be used to control a method for upsampling a digital audio signal, said steps comprising:
-
a. receiving a first digital audio signal including samples and having a first sampling rate;
b. 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;
c. incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal;
d. when the counter exceeds a threshold number, inserting at least one synthetic sample as part of the second digital audio signal; and
e. repeating steps b, c, and d, until all the samples in the first digital audio signal have been output.
-
-
16. A method of downsampling a digital audio signal, comprising:
-
(a) receiving a first digital audio signal including samples and having a first sampling rate;
(b) 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 less than the first sampling rate;
(c) incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal;
(d) when the counter exceeds a threshold number, skipping at least one sample from the first digital audio signal; and
(e) repeating (b), (c) and (d) until all the samples in the first digital audio signal have been output or skipped. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
adjusting the counter when the at least one sample is skipped.
-
-
22. The method according to claim 21, wherein adjusting the counter includes subtracting the threshold value from the counter.
-
23. The method according to claim 16, further comprising:
if the first sampling rate is at least twice the second sampling rate, skipping a predetermined number of additional samples from the first digital audio signal for each sample which is output in step b.
-
24. The method according to claim 23, wherein the predetermined number is a function of the integer floor of the ratio of the first sampling rate to the second sampling rate.
-
25. The method according to claim 16, wherein outputting the at least one sample from the first digital audio signal is accomplished by storing the at least one sample in a digital storage media.
-
26. The method according to claim 16, wherein the counter is incremented before the at least one sample from the first digital audio signal is output as part of the second digital audio signal.
-
27. A system comprising:
-
a counter;
a threshold number;
a downsampling mechanism, the downsampling mechanism configured (a) to receive a first digital audio signal, the first digital audio signal including samples and having a first sampling rate, (b) to output 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 less than the first sampling rate, (c) to increment a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal, (d) when the counter exceeds the threshold number, to skip at least one sample from the first digital audio signal, and (e) to repeat (b), (c), and (d), until all samples in the first digital audio signal have been output or skipped.
-
-
28. An article of manufacture comprising a computer-readable medium having stored thereon instructions adapted to be executed by a processor, the instructions which, when executed, define a series of steps to be used to control a method for downsampling a digital audio signal, said steps comprising:
-
a. receiving a first digital audio signal including samples and having a first sampling rate;
b. 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 less than the first sampling rate;
c. incrementing a counter for each sample from the first digital audio signal that is output as part of the second digital audio signal;
d. when the counter exceeds a threshold number, skipping at least one sample from the first digital audio signal; and
e. repeating steps b, c, and d, until all the samples in the first digital audio signal have been output or skipped.
-
-
29. A method of receiving and playing back a digital audio signal, comprising:
-
(a) receiving a first digital audio signal including samples and having a first sampling rate;
(b) storing 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 less than the first sampling rate;
(c) incrementing a first counter for each sample from the first digital audio signal that is stored as part of the second digital audio signal;
(d) when the first counter exceeds a first threshold number, skipping at least one sample from the first digital audio signal;
(e) repeating (b), (c) and (d) until all the samples in the first digital audio signal have been stored or skipped;
(f) retrieving the second digital audio signal;
(g) outputting at least one sample from the second digital audio signal as part of a third digital audio signal, the third digital audio signal having a desired third sampling rate, the third sampling rate being higher than the second sampling rate;
(h) incrementing a second counter for each sample from the second digital audio signal that is output as part of the third digital audio signal;
(i) when the second counter exceeds a second threshold number, inserting at least one synthetic sample as part of the third digital audio signal; and
(j) repeating (g), (i), and (i), until all the samples in the second digital audio signal have been output.
-
Specification