Skip to content

Commit 90b694b

Browse files
authored
Fix typos in source code comments (#101)
1 parent 8c47401 commit 90b694b

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

doc/dist10-text/common.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* 7/27/92 Mike Li (re-)Port to MS-DOS *
5555
* 8/19/92 Soren H. Nielsen Fixed bug in I_CRC_calc and in *
5656
* II_CRC_calc. Added function: new_ext *
57-
* for better MS-DOS compatability *
57+
* for better MS-DOS compatibility *
5858
* 3/10/93 Kevin Peterson changed aiff_read_headers to handle *
5959
* chunks in any order. now returns *
6060
* position of sound data in file. *

doc/vbr.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ How CBR works
213213
subband
214214
- Keep increasing the bits to whichever subband currently has the min MNR
215215
value until we have no bits left.
216-
- This mode does not guarentee that all the subbands are without noise
216+
- This mode does not guarantee that all the subbands are without noise
217217
ie there may still be subbands with MNR less than 0.0 (noisy!)
218218

219219
How VBR works

libtwolame/ath.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ FLOAT twolame_ath_db(FLOAT f, FLOAT value)
3838
3939
4040
In the past LAME was using the Painter &Spanias formula. But we had some recurrent problems
41-
with HF content. We measured real ATH values, and found the older formula to be inacurate in
41+
with HF content. We measured real ATH values, and found the older formula to be inaccurate in
4242
the higher part. So we made this new formula and this solved most of HF problematic
4343
testcases. The tradeoff is that in VBR mode it increases a lot the bitrate. */
4444

4545

46-
/* this curve can be udjusted according to the VBR scale: it adjusts from something close to
46+
/* this curve can be adjusted according to the VBR scale: it adjusts from something close to
4747
Painter & Spanias on V9 up to Bouvigne's formula for V0. This way the VBR bitrate is more
4848
balanced according to the -V value. */
4949

@@ -76,7 +76,7 @@ FLOAT twolame_ath_energy(FLOAT freq, FLOAT value)
7676
/* The values in the standard, and from the ATH formula are in dB. In the psycho model we are
7777
working in the energy domain. Hence the values that are in the absthr_X tables are not in
7878
dB. This function converts from dB into the energy domain. As noted on the LAME mailing list
79-
from years ago (MFC FIX find the reference), the absolute threhsold of hearing values in the
79+
from years ago (MFC FIX find the reference), the absolute threshold of hearing values in the
8080
tables in the standard are dodgy - the ATH in the tables do not correspond to any previously
8181
known values of the ATH. From ISO 11172 Tables D.4.x "A value of 0dB represents a level in
8282
the absolute threshold calculation of 96dB below the energy of a sine wave of amplitude

libtwolame/encode.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ int twolame_init_bit_allocation(twolame_options * glopts)
809809
outside these ranges, otherwise a new alloc table would have to be loaded in the middle of
810810
encoding. This VBR hack is dodgy - the standard says that LayerII decoders don't have to
811811
support a variable bitrate, but Layer3 decoders must do so. Hence, it is unlikely that a
812-
compliant layer2 decoder would be written to dynmically change allocation tables. *BUT* a
812+
compliant layer2 decoder would be written to dynamically change allocation tables. *BUT* a
813813
layer3 encoder might handle it by default, meaning we could switch tables mid-encode and
814814
enjoy a wider range of bitrates for the VBR encoding. None of this needs to be done for LSF,
815815
since there is only *one* possible alloc table in LSF MFC Feb 2003 */
@@ -1027,7 +1027,7 @@ static void vbr_maxmnr(FLOAT mnr[2][SBLIMIT], char used[2][SBLIMIT], int sblimit
10271027
MFC Feb 2003
10281028
vbr_bit_allocation is different to the normal a_bit_allocation in that
10291029
it is known beforehand that there are definitely enough bits to do what we
1030-
have to - i.e. a bitrate was specificially chosen in main_bit_allocation so
1030+
have to - i.e. a bitrate was specifically chosen in main_bit_allocation so
10311031
that we have enough bits to encode what we have to.
10321032
This function should take that into account and just greedily assign
10331033
the bits, rather than fussing over the minimum MNR subband - we know

libtwolame/psycho_1.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static inline FLOAT add_db(psycho_1_mem * mem, FLOAT a, FLOAT b)
130130
{
131131
/* MFC - if the difference between a and b is large (>99), then just return the largest one.
132132
(about 10% of the time) - For differences between 0 and 99, return the largest value, but
133-
add in a pre-calculated difference value. - the value 99 was chosen arbitarily. - maximum
133+
add in a pre-calculated difference value. - the value 99 was chosen arbitrarily. - maximum
134134
(a-b) i've seen is 572 */
135135
FLOAT fdiff;
136136
int idiff;
@@ -171,7 +171,7 @@ static void psycho_1_hann_fft_pickmax(FLOAT sample[FFT_SIZE], mask power[HAN_SIZ
171171

172172
if (!init) {
173173
/* calculate window function for the Fourier transform */
174-
/* These values need only be initiliased once, regardless of the caller */
174+
/* These values need only be initialised once, regardless of the caller */
175175
sqrt_8_over_3 = pow(8.0 / 3.0, 0.5);
176176
for (i = 0; i < FFT_SIZE; i++) {
177177
/* Hann window formula */

libtwolame/psycho_3.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static inline FLOAT psycho_3_add_db(psycho_3_mem * mem, FLOAT a, FLOAT b)
4444
{
4545
/* MFC - if the difference between a and b is large (>99), then just return the largest one.
4646
(about 10% of the time) - For differences between 0 and 99, return the largest value, but
47-
add in a pre-calculated difference value. - the value 99 was chosen arbitarily. - maximum
47+
add in a pre-calculated difference value. - the value 99 was chosen arbitrarily. - maximum
4848
(a-b) i've seen is 572 */
4949
FLOAT fdiff;
5050
int idiff;
@@ -358,7 +358,7 @@ static void psycho_3_threshold(psycho_3_mem * mem, FLOAT * LTg, int *tonelabel,
358358
}
359359
}
360360

361-
/* ISO11172 D.1 Step 7 Calculate the global masking threhold */
361+
/* ISO11172 D.1 Step 7 Calculate the global masking threshold */
362362
for (i = 0; i < SUBSIZE; i++) {
363363
LTg[i] = psycho_3_add_db(mem, LTnm[i], LTtm[i]);
364364
if (bit_rate < 96)
@@ -456,7 +456,7 @@ static psycho_3_mem *twolame_psycho_3_init(twolame_options * glopts)
456456
cbandindex[cbands] = 513; /* Set the top of the last critical band */
457457
mem->cbands = cbands; // make a not of the number of cbands
458458

459-
/* For each crtical band calculate the average bark value cbval [central bark value] */
459+
/* For each critical band calculate the average bark value cbval [central bark value] */
460460
for (i = 1; i < HBLKSIZE; i++)
461461
cbval[partition[i]] += bark[i]; /* sum up all the bark values */
462462
for (i = 1; i < CBANDS; i++) {

libtwolame/psycho_n1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/* a bunch of SNR values I sort of made up MFC 1 oct 99
3434
Found by averaging the SNR values over a sound file
35-
FIXME: Do a more rigourous investigation MFC Feb 2003 */
35+
FIXME: Do a more rigorous investigation MFC Feb 2003 */
3636

3737
// From Castanets.wav
3838
static const FLOAT snrdef[32] = {

libtwolame/twolame.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int init_header_info(twolame_options * glopts)
164164
return -1;
165165
}
166166
}
167-
// Copy accross the other settings
167+
// Copy across the other settings
168168
header->padding = 0; /* when requested, padding will be evaluated later for this frame */
169169
header->private_extension = glopts->private_extension;
170170
header->mode = glopts->mode;
@@ -389,7 +389,7 @@ int twolame_init_params(twolame_options * glopts)
389389
return -1;
390390
}
391391

392-
// Initialise interal variables
392+
// Initialise internal variables
393393
glopts->samples_in_buffer = 0;
394394
glopts->psycount = 0;
395395

@@ -424,7 +424,7 @@ int twolame_init_params(twolame_options * glopts)
424424
if (twolame_init_subband(&glopts->smem) < 0) {
425425
return -1;
426426
}
427-
// All initalised now :)
427+
// All initialised now :)
428428
glopts->twolame_init++;
429429

430430
return (0);
@@ -638,7 +638,7 @@ static int encode_frame(twolame_options * glopts, bit_stream * bs)
638638
buffer_put1bit(bs, 0);
639639

640640

641-
// Calulate the number of bits in this frame
641+
// Calculate the number of bits in this frame
642642
frameBits = twolame_buffer_sstell(bs) - initial_bits;
643643
if (frameBits % 8) { /* a program failure */
644644
fprintf(stderr, "Sent %ld bits = %ld slots plus %ld\n", frameBits, frameBits / 8,

libtwolame/twolame.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ TL_API const char *get_twolame_url(void);
150150
/** Print the library version and
151151
* encoder parameter settings to STDERR.
152152
*
153-
* Will display differnent ammounts of information
153+
* Will display different amounts of information
154154
* depending on the verbosity setting.
155155
* If verbosity is set to 0 then no message will be displayed.
156156
*
@@ -188,7 +188,7 @@ TL_API int twolame_init_params(twolame_options * glopts);
188188

189189
/** Encode some 16-bit PCM audio to MP2.
190190
*
191-
* Takes 16-bit PCM audio samples from seperate left and right
191+
* Takes 16-bit PCM audio samples from separate left and right
192192
* buffers and places encoded audio into mp2buffer.
193193
*
194194
* \param glopts twolame options pointer
@@ -228,7 +228,7 @@ TL_API int twolame_encode_buffer_interleaved(twolame_options * glopts,
228228

229229
/** Encode some 32-bit PCM audio to MP2.
230230
*
231-
* Takes 32-bit floating point PCM audio samples from seperate
231+
* Takes 32-bit floating point PCM audio samples from separate
232232
* left and right buffers and places encoded audio into mp2buffer.
233233
*
234234
* Note: the 32-bit samples are currently scaled down to
@@ -378,7 +378,7 @@ TL_API TWOLAME_MPEG_version twolame_get_version(twolame_options * glopts);
378378
TL_API const char *twolame_get_version_name(twolame_options * glopts);
379379

380380

381-
/** Set the freeformat strem mode.
381+
/** Set the freeformat stream mode.
382382
*
383383
* \param glopts pointer to twolame options pointer
384384
* \param freef freeformat mode ( TRUE / FALSE )
@@ -689,7 +689,7 @@ TL_API int twolame_get_error_protection(twolame_options * glopts);
689689
TL_API int twolame_set_copyright(twolame_options * glopts, int copyright);
690690

691691

692-
/** Get the copright flag state
692+
/** Get the copyright flag state
693693
*
694694
* \param glopts pointer to twolame options pointer
695695
* \return state of the copyright flag (TRUE/FALSE)

libtwolame/util.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "util.h"
3232

3333

34-
// Return string containg version number
34+
// Return string containing version number
3535
// of this library
3636
const char *get_twolame_version(void)
3737
{
@@ -40,7 +40,7 @@ const char *get_twolame_version(void)
4040
return str;
4141
}
4242

43-
// Return string containg version number
43+
// Return string containing version number
4444
// of this library
4545
const char *get_twolame_url(void)
4646
{
@@ -157,7 +157,7 @@ int twolame_get_framelength(twolame_options * glopts)
157157
}
158158

159159

160-
// Get the bitrate corrensponding to a given index
160+
// Get the bitrate corresponding to a given index
161161
int twolame_index_bitrate(int mpeg_ver, int index)
162162
{
163163
if (index>0 && index<15) {

0 commit comments

Comments
 (0)