Lines Matching refs:fragment
6 "getsample($module, fragment, width, index, /)\n"
9 "Return the value of sample index from the fragment.");
15 audioop_getsample_impl(PyObject *module, Py_buffer *fragment, int width,
22 Py_buffer fragment = {NULL, NULL};
29 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
32 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
52 return_value = audioop_getsample_impl(module, &fragment, width, index);
55 /* Cleanup for fragment */
56 if (fragment.obj) {
57 PyBuffer_Release(&fragment);
64 "max($module, fragment, width, /)\n"
67 "Return the maximum of the absolute value of all samples in a fragment.");
73 audioop_max_impl(PyObject *module, Py_buffer *fragment, int width);
79 Py_buffer fragment = {NULL, NULL};
85 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
88 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
96 return_value = audioop_max_impl(module, &fragment, width);
99 /* Cleanup for fragment */
100 if (fragment.obj) {
101 PyBuffer_Release(&fragment);
108 "minmax($module, fragment, width, /)\n"
111 "Return the minimum and maximum values of all samples in the sound fragment.");
117 audioop_minmax_impl(PyObject *module, Py_buffer *fragment, int width);
123 Py_buffer fragment = {NULL, NULL};
129 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
132 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
140 return_value = audioop_minmax_impl(module, &fragment, width);
143 /* Cleanup for fragment */
144 if (fragment.obj) {
145 PyBuffer_Release(&fragment);
152 "avg($module, fragment, width, /)\n"
155 "Return the average over all samples in the fragment.");
161 audioop_avg_impl(PyObject *module, Py_buffer *fragment, int width);
167 Py_buffer fragment = {NULL, NULL};
173 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
176 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
184 return_value = audioop_avg_impl(module, &fragment, width);
187 /* Cleanup for fragment */
188 if (fragment.obj) {
189 PyBuffer_Release(&fragment);
196 "rms($module, fragment, width, /)\n"
199 "Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n).");
205 audioop_rms_impl(PyObject *module, Py_buffer *fragment, int width);
211 Py_buffer fragment = {NULL, NULL};
217 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
220 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
228 return_value = audioop_rms_impl(module, &fragment, width);
231 /* Cleanup for fragment */
232 if (fragment.obj) {
233 PyBuffer_Release(&fragment);
240 "findfit($module, fragment, reference, /)\n"
243 "Try to match reference as well as possible to a portion of fragment.");
249 audioop_findfit_impl(PyObject *module, Py_buffer *fragment,
256 Py_buffer fragment = {NULL, NULL};
262 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
265 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
276 return_value = audioop_findfit_impl(module, &fragment, &reference);
279 /* Cleanup for fragment */
280 if (fragment.obj) {
281 PyBuffer_Release(&fragment);
292 "findfactor($module, fragment, reference, /)\n"
295 "Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal.");
301 audioop_findfactor_impl(PyObject *module, Py_buffer *fragment,
308 Py_buffer fragment = {NULL, NULL};
314 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
317 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
328 return_value = audioop_findfactor_impl(module, &fragment, &reference);
331 /* Cleanup for fragment */
332 if (fragment.obj) {
333 PyBuffer_Release(&fragment);
344 "findmax($module, fragment, length, /)\n"
347 "Search fragment for a slice of specified number of samples with maximum energy.");
353 audioop_findmax_impl(PyObject *module, Py_buffer *fragment,
360 Py_buffer fragment = {NULL, NULL};
366 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
369 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
385 return_value = audioop_findmax_impl(module, &fragment, length);
388 /* Cleanup for fragment */
389 if (fragment.obj) {
390 PyBuffer_Release(&fragment);
397 "avgpp($module, fragment, width, /)\n"
400 "Return the average peak-peak value over all samples in the fragment.");
406 audioop_avgpp_impl(PyObject *module, Py_buffer *fragment, int width);
412 Py_buffer fragment = {NULL, NULL};
418 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
421 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
429 return_value = audioop_avgpp_impl(module, &fragment, width);
432 /* Cleanup for fragment */
433 if (fragment.obj) {
434 PyBuffer_Release(&fragment);
441 "maxpp($module, fragment, width, /)\n"
444 "Return the maximum peak-peak value in the sound fragment.");
450 audioop_maxpp_impl(PyObject *module, Py_buffer *fragment, int width);
456 Py_buffer fragment = {NULL, NULL};
462 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
465 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
473 return_value = audioop_maxpp_impl(module, &fragment, width);
476 /* Cleanup for fragment */
477 if (fragment.obj) {
478 PyBuffer_Release(&fragment);
485 "cross($module, fragment, width, /)\n"
488 "Return the number of zero crossings in the fragment passed as an argument.");
494 audioop_cross_impl(PyObject *module, Py_buffer *fragment, int width);
500 Py_buffer fragment = {NULL, NULL};
506 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
509 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
517 return_value = audioop_cross_impl(module, &fragment, width);
520 /* Cleanup for fragment */
521 if (fragment.obj) {
522 PyBuffer_Release(&fragment);
529 "mul($module, fragment, width, factor, /)\n"
532 "Return a fragment that has all samples in the original fragment multiplied by the floating-point value factor.");
538 audioop_mul_impl(PyObject *module, Py_buffer *fragment, int width,
545 Py_buffer fragment = {NULL, NULL};
552 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
555 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
573 return_value = audioop_mul_impl(module, &fragment, width, factor);
576 /* Cleanup for fragment */
577 if (fragment.obj) {
578 PyBuffer_Release(&fragment);
585 "tomono($module, fragment, width, lfactor, rfactor, /)\n"
588 "Convert a stereo fragment to a mono fragment.");
594 audioop_tomono_impl(PyObject *module, Py_buffer *fragment, int width,
601 Py_buffer fragment = {NULL, NULL};
609 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
612 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
640 return_value = audioop_tomono_impl(module, &fragment, width, lfactor, rfactor);
643 /* Cleanup for fragment */
644 if (fragment.obj) {
645 PyBuffer_Release(&fragment);
652 "tostereo($module, fragment, width, lfactor, rfactor, /)\n"
655 "Generate a stereo fragment from a mono fragment.");
661 audioop_tostereo_impl(PyObject *module, Py_buffer *fragment, int width,
668 Py_buffer fragment = {NULL, NULL};
676 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
679 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
707 return_value = audioop_tostereo_impl(module, &fragment, width, lfactor, rfactor);
710 /* Cleanup for fragment */
711 if (fragment.obj) {
712 PyBuffer_Release(&fragment);
722 "Return a fragment which is the addition of the two samples passed as parameters.");
776 "bias($module, fragment, width, bias, /)\n"
779 "Return a fragment that is the original fragment with a bias added to each sample.");
785 audioop_bias_impl(PyObject *module, Py_buffer *fragment, int width, int bias);
791 Py_buffer fragment = {NULL, NULL};
798 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
801 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
813 return_value = audioop_bias_impl(module, &fragment, width, bias);
816 /* Cleanup for fragment */
817 if (fragment.obj) {
818 PyBuffer_Release(&fragment);
825 "reverse($module, fragment, width, /)\n"
828 "Reverse the samples in a fragment and returns the modified fragment.");
834 audioop_reverse_impl(PyObject *module, Py_buffer *fragment, int width);
840 Py_buffer fragment = {NULL, NULL};
846 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
849 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
857 return_value = audioop_reverse_impl(module, &fragment, width);
860 /* Cleanup for fragment */
861 if (fragment.obj) {
862 PyBuffer_Release(&fragment);
869 "byteswap($module, fragment, width, /)\n"
878 audioop_byteswap_impl(PyObject *module, Py_buffer *fragment, int width);
884 Py_buffer fragment = {NULL, NULL};
890 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
893 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
901 return_value = audioop_byteswap_impl(module, &fragment, width);
904 /* Cleanup for fragment */
905 if (fragment.obj) {
906 PyBuffer_Release(&fragment);
913 "lin2lin($module, fragment, width, newwidth, /)\n"
922 audioop_lin2lin_impl(PyObject *module, Py_buffer *fragment, int width,
929 Py_buffer fragment = {NULL, NULL};
936 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
939 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
951 return_value = audioop_lin2lin_impl(module, &fragment, width, newwidth);
954 /* Cleanup for fragment */
955 if (fragment.obj) {
956 PyBuffer_Release(&fragment);
963 "ratecv($module, fragment, width, nchannels, inrate, outrate, state,\n"
967 "Convert the frame rate of the input fragment.");
973 audioop_ratecv_impl(PyObject *module, Py_buffer *fragment, int width,
981 Py_buffer fragment = {NULL, NULL};
993 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
996 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1032 return_value = audioop_ratecv_impl(module, &fragment, width, nchannels, inrate, outrate, state, weightA, weightB);
1035 /* Cleanup for fragment */
1036 if (fragment.obj) {
1037 PyBuffer_Release(&fragment);
1044 "lin2ulaw($module, fragment, width, /)\n"
1047 "Convert samples in the audio fragment to u-LAW encoding.");
1053 audioop_lin2ulaw_impl(PyObject *module, Py_buffer *fragment, int width);
1059 Py_buffer fragment = {NULL, NULL};
1065 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1068 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1076 return_value = audioop_lin2ulaw_impl(module, &fragment, width);
1079 /* Cleanup for fragment */
1080 if (fragment.obj) {
1081 PyBuffer_Release(&fragment);
1088 "ulaw2lin($module, fragment, width, /)\n"
1097 audioop_ulaw2lin_impl(PyObject *module, Py_buffer *fragment, int width);
1103 Py_buffer fragment = {NULL, NULL};
1109 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1112 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1120 return_value = audioop_ulaw2lin_impl(module, &fragment, width);
1123 /* Cleanup for fragment */
1124 if (fragment.obj) {
1125 PyBuffer_Release(&fragment);
1132 "lin2alaw($module, fragment, width, /)\n"
1135 "Convert samples in the audio fragment to a-LAW encoding.");
1141 audioop_lin2alaw_impl(PyObject *module, Py_buffer *fragment, int width);
1147 Py_buffer fragment = {NULL, NULL};
1153 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1156 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1164 return_value = audioop_lin2alaw_impl(module, &fragment, width);
1167 /* Cleanup for fragment */
1168 if (fragment.obj) {
1169 PyBuffer_Release(&fragment);
1176 "alaw2lin($module, fragment, width, /)\n"
1185 audioop_alaw2lin_impl(PyObject *module, Py_buffer *fragment, int width);
1191 Py_buffer fragment = {NULL, NULL};
1197 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1200 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1208 return_value = audioop_alaw2lin_impl(module, &fragment, width);
1211 /* Cleanup for fragment */
1212 if (fragment.obj) {
1213 PyBuffer_Release(&fragment);
1220 "lin2adpcm($module, fragment, width, state, /)\n"
1229 audioop_lin2adpcm_impl(PyObject *module, Py_buffer *fragment, int width,
1236 Py_buffer fragment = {NULL, NULL};
1243 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1246 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1255 return_value = audioop_lin2adpcm_impl(module, &fragment, width, state);
1258 /* Cleanup for fragment */
1259 if (fragment.obj) {
1260 PyBuffer_Release(&fragment);
1267 "adpcm2lin($module, fragment, width, state, /)\n"
1270 "Decode an Intel/DVI ADPCM coded fragment to a linear fragment.");
1276 audioop_adpcm2lin_impl(PyObject *module, Py_buffer *fragment, int width,
1283 Py_buffer fragment = {NULL, NULL};
1290 if (PyObject_GetBuffer(args[0], &fragment, PyBUF_SIMPLE) != 0) {
1293 if (!PyBuffer_IsContiguous(&fragment, 'C')) {
1302 return_value = audioop_adpcm2lin_impl(module, &fragment, width, state);
1305 /* Cleanup for fragment */
1306 if (fragment.obj) {
1307 PyBuffer_Release(&fragment);