@@ -33,15 +33,15 @@ msgid ""
3333"<bytes-like object>`. All scalar items are integers, unless specified "
3434"otherwise."
3535msgstr ""
36- ":mod:`audioop` 模块包含针对声音片段的一些有用操作。它操作的声音片段由 8、16、24 或 32 位宽的有符号整型样本组成 ,存储在 "
36+ ":mod:`audioop` 模块包含针对声音片段的一些有用操作。它操作的声音片段由 8、16、24 或 32 位宽的有符号整型采样值组成 ,存储在 "
3737":term:`类字节串对象 <bytes-like object>` 中。除非特别说明,否则所有标量项目均为整数。"
3838
3939#: ../../library/audioop.rst:14
4040msgid ""
4141"Support for 24-bit samples was added. All functions now accept any :term"
4242":`bytes-like object`. String input now results in an immediate error."
4343msgstr ""
44- "增加了对 24 位样本的支持 。现在,所有函数都接受任何 :term:`类字节串对象 <bytes-like "
44+ "增加了对 24 位采样的支持 。现在,所有函数都接受任何 :term:`类字节串对象 <bytes-like "
4545"object>`。而传入字符串会立即导致错误。"
4646
4747#: ../../library/audioop.rst:25
@@ -53,7 +53,7 @@ msgstr "本模块提供对 a-LAW、u-LAW 和 Intel/DVI ADPCM 编码的支持。"
5353msgid ""
5454"A few of the more complicated operations only take 16-bit samples, otherwise"
5555" the sample size (in bytes) is always a parameter of the operation."
56- msgstr "部分更复杂的操作仅接受 16 位样本,而其他操作始终需要样本大小 (以字节为单位)作为该操作的参数。"
56+ msgstr "部分更复杂的操作仅接受 16 位采样,而其他操作始终需要采样大小 (以字节为单位)作为该操作的参数。"
5757
5858#: ../../library/audioop.rst:32
5959msgid "The module defines the following variables and functions:"
@@ -63,7 +63,7 @@ msgstr "此模块定义了下列变量和函数:"
6363msgid ""
6464"This exception is raised on all errors, such as unknown number of bytes per "
6565"sample, etc."
66- msgstr "所有错误都会抛出此异常,比如样本的字节数未知等等 。"
66+ msgstr "所有错误都会抛出此异常,比如采样值的字节数未知等等 。"
6767
6868#: ../../library/audioop.rst:43
6969msgid ""
@@ -72,8 +72,8 @@ msgid ""
7272" or ``4``. Both fragments should have the same length. Samples are "
7373"truncated in case of overflow."
7474msgstr ""
75- "两个样本作为参数传入 ,返回一个片段,该片段是两个样本的和 。*width* 是样本位宽 (以字节为单位),可以取 ``1``, ``2``, ``3`` 或"
76- " ``4``。两个片段的长度应相同。如果发生溢出,较长的样本将被截断 。"
75+ "两个采样作为参数传入 ,返回一个片段,该片段是两个采样的和 。*width* 是采样位宽 (以字节为单位),可以取 ``1``, ``2``, ``3`` 或"
76+ " ``4``。两个片段的长度应相同。如果发生溢出,较长的采样将被截断 。"
7777
7878#: ../../library/audioop.rst:50
7979msgid ""
@@ -90,34 +90,34 @@ msgid ""
9090"fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only"
9191" to the sample width of the output fragment here."
9292msgstr ""
93- "将 a-LAW 编码的声音片段转换为线性编码声音片段。由于 a-LAW 编码样本始终为 8 位,因此这里的 *width* 仅指输出片段的样本位宽 。"
93+ "将 a-LAW 编码的声音片段转换为线性编码声音片段。由于 a-LAW 编码采样值始终为 8 位,因此这里的 *width* 仅指输出片段的采样位宽 。"
9494
9595#: ../../library/audioop.rst:64
9696msgid "Return the average over all samples in the fragment."
97- msgstr "返回片段中所有样本的平均值 。"
97+ msgstr "返回片段中所有采样值的平均值 。"
9898
9999#: ../../library/audioop.rst:69
100100msgid ""
101101"Return the average peak-peak value over all samples in the fragment. No "
102102"filtering is done, so the usefulness of this routine is questionable."
103- msgstr "返回片段中所有样本的平均峰峰值 。由于没有进行过滤,因此该例程的实用性尚存疑。"
103+ msgstr "返回片段中所有采样值的平均峰峰值 。由于没有进行过滤,因此该例程的实用性尚存疑。"
104104
105105#: ../../library/audioop.rst:75
106106msgid ""
107107"Return a fragment that is the original fragment with a bias added to each "
108108"sample. Samples wrap around in case of overflow."
109- msgstr "返回一个片段,该片段由原始片段中的每个样本加上偏差组成。在溢出时样本会回卷 (wrap around)。"
109+ msgstr "返回一个片段,该片段由原始片段中的每个采样值加上偏差组成。在溢出时采样值会回卷 (wrap around)。"
110110
111111#: ../../library/audioop.rst:81
112112msgid ""
113113"\" Byteswap\" all samples in a fragment and returns the modified fragment. "
114114"Converts big-endian samples to little-endian and vice versa."
115- msgstr "“按字节交换”片段中的所有样本 ,返回修改后的片段。将大端序样本转换为小端序样本 ,反之亦然。"
115+ msgstr "“按字节交换”片段中的所有采样值 ,返回修改后的片段。将大端序采样转换为小端序采样 ,反之亦然。"
116116
117117#: ../../library/audioop.rst:89
118118msgid ""
119119"Return the number of zero crossings in the fragment passed as an argument."
120- msgstr ""
120+ msgstr "将片段作为参数传入,返回其中过零点的数量。 "
121121
122122#: ../../library/audioop.rst:94
123123msgid ""
@@ -126,10 +126,12 @@ msgid ""
126126"to make it match as well as possible to *fragment*. The fragments should "
127127"both contain 2-byte samples."
128128msgstr ""
129+ "返回一个系数 *F* 使得 ``rms(add(fragment, mul(reference, -F)))`` 最小,即返回的系数乘以 "
130+ "*reference* 后与 *fragment* 最匹配。两个片段都应包含 2 字节宽的采样。"
129131
130132#: ../../library/audioop.rst:99
131133msgid "The time taken by this routine is proportional to ``len(fragment)``."
132- msgstr ""
134+ msgstr "本例程所需的时间与 ``len(fragment)`` 成正比。 "
133135
134136#: ../../library/audioop.rst:104
135137msgid ""
@@ -143,7 +145,7 @@ msgid ""
143145msgstr ""
144146"尽可能尝试让 *reference* 匹配 *fragment* 的一部分(*fragment* 应较长)。从概念上讲,完成这些靠从 "
145147"*fragment* 中取出切片,使用 :func:`findfactor` 计算最佳匹配,并最小化结果。两个片段都应包含 2 "
146- "字节宽的样本 。返回一个元组 ``(offset, factor)``,其中 *offset* 是在 *fragment* "
148+ "字节宽的采样 。返回一个元组 ``(offset, factor)``,其中 *offset* 是在 *fragment* "
147149"中的偏移量(整数),表示从此处开始最佳匹配,而 *factor* 是由 :func:`findfactor` 定义的因数(浮点数)。"
148150
149151#: ../../library/audioop.rst:115
@@ -153,14 +155,16 @@ msgid ""
153155"``rms(fragment[i*2:(i+length)*2])`` is maximal. The fragments should both "
154156"contain 2-byte samples."
155157msgstr ""
158+ "在 *fragment* 中搜索所有长度为 *length* 的采样切片(不是字节!)中,能量最大的那一个切片,即返回 *i* 使得 "
159+ "``rms(fragment[i*2:(i+length)*2])`` 最大。两个片段都应包含 2 字节宽的采样。"
156160
157161#: ../../library/audioop.rst:119
158162msgid "The routine takes time proportional to ``len(fragment)``."
159- msgstr ""
163+ msgstr "本例程所需的时间与 ``len(fragment)`` 成正比。 "
160164
161165#: ../../library/audioop.rst:124
162166msgid "Return the value of sample *index* from the fragment."
163- msgstr ""
167+ msgstr "返回片段中采样值索引 *index* 的值。 "
164168
165169#: ../../library/audioop.rst:129
166170msgid ""
@@ -170,6 +174,8 @@ msgid ""
170174"algorithm has been selected for use by the IMA, so it may well become a "
171175"standard."
172176msgstr ""
177+ "将采样转换为 4 位 Intel/DVI ADPCM 编码。ADPCM 编码是一种自适应编码方案,其中每个 4 "
178+ "比特数字是一个采样值与下一个采样值之间的差除以(不定的)步长。IMA 已选择使用 Intel/DVI ADPCM 算法,因此它很可能成为标准。"
173179
174180#: ../../library/audioop.rst:134
175181msgid ""
@@ -179,6 +185,9 @@ msgid ""
179185" as the state. *adpcmfrag* is the ADPCM coded fragment packed 2 4-bit values"
180186" per byte."
181187msgstr ""
188+ "*state* 是一个表示编码器状态的元组。编码器返回一个元组 ``(adpcmfrag, newstate)``,而 *newstate* "
189+ "要在下一次调用 :func:`lin2adpcm` 时传入。在初始调用中,可以将 ``None`` 作为 state 传递。*adpcmfrag* 是 "
190+ "ADPCM 编码的片段,每个字节打包了 2 个 4 比特值。"
182191
183192#: ../../library/audioop.rst:142
184193msgid ""
@@ -187,10 +196,12 @@ msgid ""
187196"range of about 13 bits using only 8 bit samples. It is used by the Sun "
188197"audio hardware, among others."
189198msgstr ""
199+ "将音频片段中的采样值转换为 a-LAW 编码,并将其作为字节对象返回。a-LAW 是一种音频编码格式,仅使用 8 位采样即可获得大约 13 "
200+ "位的动态范围。Sun 音频硬件等使用该编码。"
190201
191202#: ../../library/audioop.rst:150
192203msgid "Convert samples between 1-, 2-, 3- and 4-byte formats."
193- msgstr ""
204+ msgstr "将采样在 1、2、3 和 4 字节格式之间转换。 "
194205
195206#: ../../library/audioop.rst:154
196207msgid ""
0 commit comments