Home
last modified time | relevance | path

Searched refs:nchannels (Results 1 – 25 of 42) sorted by relevance

12

/external/libopus/src/
Dopus_compare.c182 int nchannels; in main() local
193 nchannels=1; in main()
195 nchannels=2; in main()
232 if(nchannels==1){ in main()
236 ylength=read_pcm16(&y,fin2,nchannels); in main()
249 xb=(float *)opus_malloc(nframes*NBANDS*nchannels*sizeof(*xb)); in main()
250 X=(float *)opus_malloc(nframes*NFREQS*nchannels*sizeof(*X)); in main()
251 Y=(float *)opus_malloc(nframes*yfreqs*nchannels*sizeof(*Y)); in main()
254 band_energy(xb,X,BANDS,NBANDS,x,nchannels,nframes, in main()
257 band_energy(NULL,Y,BANDS,ybands,y,nchannels,nframes, in main()
[all …]
/external/python/cpython2/Modules/
Dlinuxaudiodev.c242 int rate, ssize, nchannels, n, fmt, emulate=0; in lad_setparameters() local
245 &rate, &ssize, &nchannels, &fmt, &emulate)) in lad_setparameters()
258 if (nchannels != 1 && nchannels != 2) { in lad_setparameters()
260 nchannels); in lad_setparameters()
291 if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, &nchannels) == -1) { in lad_setparameters()
305 _ssize(lad_t *self, int *nchannels, int *ssize) in _ssize() argument
331 if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) in _ssize()
343 int nchannels=0, ssize=0; in lad_bufsize() local
345 if (_ssize(self, &nchannels, &ssize) < 0 || !ssize || !nchannels) { in lad_bufsize()
353 return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); in lad_bufsize()
[all …]
Dossaudiodev.c538 _ssize(oss_audio_t *self, int *nchannels, int *ssize) in _ssize() argument
564 if (ioctl(self->fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) in _ssize()
576 int nchannels=0, ssize=0; in oss_bufsize() local
578 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_bufsize()
586 return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); in oss_bufsize()
595 int nchannels=0, ssize=0; in oss_obufcount() local
597 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_obufcount()
606 (ssize * nchannels)); in oss_obufcount()
615 int nchannels=0, ssize=0; in oss_obuffree() local
617 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_obuffree()
[all …]
Daudioop.c1097 int len, size, nchannels, inrate, outrate, weightA, weightB; in audioop_ratecv() local
1105 &nchannels, &inrate, &outrate, &state, in audioop_ratecv()
1110 if (nchannels < 1) { in audioop_ratecv()
1114 bytes_per_frame = size * nchannels; in audioop_ratecv()
1115 if (bytes_per_frame / nchannels != size) { in audioop_ratecv()
1145 if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) { in audioop_ratecv()
1150 prev_i = (int *) malloc(nchannels * sizeof(int)); in audioop_ratecv()
1151 cur_i = (int *) malloc(nchannels * sizeof(int)); in audioop_ratecv()
1161 for (chan = 0; chan < nchannels; chan++) in audioop_ratecv()
1173 if (PyTuple_Size(samps) != nchannels) { in audioop_ratecv()
[all …]
/external/python/cpython2/Lib/test/
Dtest_linuxaudiodev.py35 size, enc, rate, nchannels, extra = sunaudio.gethdr(fp)
52 self.dev.setparameters(rate, 16, nchannels, fmt)
60 nchannels = 1
62 self.dev.setparameters(-1, size, nchannels, fmt)
66 self.dev.setparameters(rate, -2, nchannels, fmt)
74 self.dev.setparameters(rate, size, nchannels, 177)
78 self.dev.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE)
83 self.dev.setparameters(rate, 16, nchannels, fmt)
Dtest_sunau.py16 nchannels = 2 variable in SunauPCM8Test
33 nchannels = 2 variable in SunauPCM16Test
52 nchannels = 2 variable in SunauPCM32Test
77 nchannels = 2 variable in SunauULAWTest
Dtest_wave.py19 nchannels = 2 variable in WavePCM8Test
36 nchannels = 2 variable in WavePCM16Test
63 nchannels = 2 variable in WavePCM24Test
90 nchannels = 2 variable in WavePCM32Test
Daudiotests.py51 def check_params(self, f, nchannels, sampwidth, framerate, nframes, argument
53 self.assertEqual(f.getnchannels(), nchannels)
62 (nchannels, sampwidth, framerate, nframes, comptype, compname))
73 f.setnchannels(self.nchannels)
82 self.assertEqual(f.getnchannels(), self.nchannels)
94 self.check_params(f, self.nchannels, self.sampwidth, self.framerate,
123 framesize = self.nchannels * self.sampwidth
197 framesize = self.nchannels * self.sampwidth
210 self.check_params(f, self.nchannels, self.sampwidth, self.framerate,
228 framesize = self.nchannels * self.sampwidth
[all …]
Dtest_ossaudiodev.py30 nchannels = au.getnchannels()
40 return (data, rate, 16, nchannels)
44 def play_sound_file(self, data, rate, ssize, nchannels): argument
75 expected_time = float(len(data)) / (ssize//8) / nchannels / rate
78 dsp.setparameters(AFMT_S16_NE, nchannels, rate)
Dtest_aifc.py22 nchannels = 2 variable in AifcPCM8Test
39 nchannels = 2 variable in AifcPCM16Test
58 nchannels = 2 variable in AifcPCM24Test
83 nchannels = 2 variable in AifcPCM32Test
108 nchannels = 2 variable in AifcULAWTest
/external/python/cpython3/Lib/test/
Daudiotests.py28 def check_params(self, f, nchannels, sampwidth, framerate, nframes, argument
30 self.assertEqual(f.getnchannels(), nchannels)
39 (nchannels, sampwidth, framerate, nframes, comptype, compname))
40 self.assertEqual(params.nchannels, nchannels)
56 f.setnchannels(self.nchannels)
64 self.assertEqual(f.getnchannels(), self.nchannels)
74 self.check_params(f, self.nchannels, self.sampwidth, self.framerate,
92 f.setnchannels(self.nchannels)
101 self.assertEqual(params.nchannels, self.nchannels)
112 f.setnchannels(self.nchannels)
[all …]
Dtest_sunau.py18 nchannels = 2 variable in SunauPCM8Test
35 nchannels = 2 variable in SunauPCM16Test
54 nchannels = 2 variable in SunauPCM24Test
79 nchannels = 2 variable in SunauPCM32Test
104 nchannels = 2 variable in SunauULAWTest
Dtest_ossaudiodev.py30 nchannels = au.getnchannels()
40 return (data, rate, 16, nchannels)
44 def play_sound_file(self, data, rate, ssize, nchannels): argument
75 expected_time = float(len(data)) / (ssize/8) / nchannels / rate
78 dsp.setparameters(AFMT_S16_NE, nchannels, rate)
Dtest_wave.py19 nchannels = 2 variable in WavePCM8Test
36 nchannels = 2 variable in WavePCM16Test
57 nchannels = 2 variable in WavePCM24Test
84 nchannels = 2 variable in WavePCM32Test
Dtest_aifc.py21 nchannels = 2 variable in AifcPCM8Test
38 nchannels = 2 variable in AifcPCM16Test
57 nchannels = 2 variable in AifcPCM24Test
82 nchannels = 2 variable in AifcPCM32Test
107 nchannels = 2 variable in AifcULAWTest
128 nchannels = 2 variable in AifcALAWTest
177 self.assertEqual(params.nchannels, f.getnchannels())
285 for nchannels in 0, -1:
287 b += b'COMM' + struct.pack('>LhlhhLL', 38, nchannels, 0, 8,
/external/python/cpython2/Lib/
Daudiodev.py106 def setnchannels(self, nchannels): argument
108 if nchannels == raw:
154 self.nchannels = 0
173 def setnchannels(self, nchannels): argument
174 self.nchannels = nchannels
185 info.o_channels = self.nchannels
Dsndhdr.py91 nchannels = f(h[20:24])
102 frame_size = sample_size * nchannels
103 return type, rate, nchannels, data_size//frame_size, sample_bits
135 nchannels = get_short_le(h[22:24])
138 return 'wav', rate, nchannels, -1, sample_bits
Dsunau.py315 def setnchannels(self, nchannels): argument
318 if nchannels not in (1, 2, 4):
320 self._nchannels = nchannels
377 nchannels, sampwidth, framerate, nframes, comptype, compname = params
378 self.setnchannels(nchannels)
Dwave.py335 def setnchannels(self, nchannels): argument
338 if nchannels < 1:
340 self._nchannels = nchannels
394 nchannels, sampwidth, framerate, nframes, comptype, compname = params
397 self.setnchannels(nchannels)
/external/python/cpython3/Lib/
Dsndhdr.py45 SndHeaders.nchannels.__doc__ = ("""The number of channels or 0 if it cannot be
108 nchannels = func(h[20:24])
119 frame_size = sample_size * nchannels
124 return filetype, rate, nchannels, nframe, sample_bits
Dwave.py337 def setnchannels(self, nchannels): argument
340 if nchannels < 1:
342 self._nchannels = nchannels
396 nchannels, sampwidth, framerate, nframes, comptype, compname = params
399 self.setnchannels(nchannels)
Dsunau.py342 def setnchannels(self, nchannels): argument
345 if nchannels not in (1, 2, 4):
347 self._nchannels = nchannels
404 nchannels, sampwidth, framerate, nframes, comptype, compname = params
405 self.setnchannels(nchannels)
/external/python/cpython3/Modules/
Dossaudiodev.c613 _ssize(oss_audio_t *self, int *nchannels, int *ssize) in _ssize() argument
639 if (ioctl(self->fd, SNDCTL_DSP_CHANNELS, nchannels) < 0) in _ssize()
651 int nchannels=0, ssize=0; in oss_bufsize() local
656 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_bufsize()
664 return PyLong_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize)); in oss_bufsize()
673 int nchannels=0, ssize=0; in oss_obufcount() local
678 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_obufcount()
687 (ssize * nchannels)); in oss_obufcount()
696 int nchannels=0, ssize=0; in oss_obuffree() local
701 if (_ssize(self, &nchannels, &ssize) < 0 || !nchannels || !ssize) { in oss_obuffree()
[all …]
Daudioop.c1317 int nchannels, int inrate, int outrate, PyObject *state, in audioop_ratecv_impl() argument
1329 if (nchannels < 1) { in audioop_ratecv_impl()
1334 if (width > INT_MAX / nchannels) { in audioop_ratecv_impl()
1342 bytes_per_frame = width * nchannels; in audioop_ratecv_impl()
1368 if ((size_t)nchannels > SIZE_MAX/sizeof(int)) { in audioop_ratecv_impl()
1373 prev_i = (int *) PyMem_Malloc(nchannels * sizeof(int)); in audioop_ratecv_impl()
1374 cur_i = (int *) PyMem_Malloc(nchannels * sizeof(int)); in audioop_ratecv_impl()
1384 for (chan = 0; chan < nchannels; chan++) in audioop_ratecv_impl()
1396 if (PyTuple_Size(samps) != nchannels) { in audioop_ratecv_impl()
1401 for (chan = 0; chan < nchannels; chan++) { in audioop_ratecv_impl()
[all …]
/external/pdfium/third_party/lcms/src/
Dcmsalpha.c326 cmsUInt32Number nchannels = T_CHANNELS(Format); in ComputeIncrementsForChunky() local
327 cmsUInt32Number total_chans = nchannels + extra; in ComputeIncrementsForChunky()
370 ComponentStartingOrder[i] = channels[i + nchannels]; in ComputeIncrementsForChunky()
384 cmsUInt32Number nchannels = T_CHANNELS(Format); in ComputeIncrementsForPlanar() local
385 cmsUInt32Number total_chans = nchannels + extra; in ComputeIncrementsForPlanar()
426 ComponentStartingOrder[i] = channels[i + nchannels]; in ComputeIncrementsForPlanar()

12