Lines Matching refs:pPriv
57 priv_t* pPriv = (priv_t*)ft->priv; in sunstartread() local
74 pPriv->device = open(szDevname, O_RDONLY); in sunstartread()
75 if (pPriv->device < 0) { in sunstartread()
84 if (ioctl(pPriv->device, AUDIO_GETDEV, &audio_dev) < 0) { in sunstartread()
117 pPriv->sample_shift = 0; in sunstartread()
134 pPriv->sample_shift = 1; in sunstartread()
157 if (ioctl(pPriv->device, AUDIO_GETINFO, &audio_if) < 0) { in sunstartread()
172 ioctl(pPriv->device, AUDIO_SETINFO, &audio_if); in sunstartread()
191 ioctl(pPriv->device, AUDIO_FLUSH); in sunstartread()
193 ioctl(pPriv->device, (unsigned long int)I_FLUSH, FLUSHR); in sunstartread()
195 ioctl(pPriv->device, I_FLUSH, FLUSHR); in sunstartread()
198 pPriv->cOutput = 0; in sunstartread()
199 pPriv->pOutput = NULL; in sunstartread()
213 priv_t* pPriv = (priv_t*)ft->priv; in sunstartwrite() local
221 pPriv->device = open(szDevname, O_WRONLY); in sunstartwrite()
222 if (pPriv->device < 0) { in sunstartwrite()
229 if (ioctl(pPriv->device, AUDIO_GETDEV, &audio_dev) < 0) { in sunstartwrite()
262 pPriv->sample_shift = 0; in sunstartwrite()
283 pPriv->sample_shift = 1; in sunstartwrite()
297 pPriv->sample_shift = 1; in sunstartwrite()
303 if (ioctl(pPriv->device, AUDIO_GETINFO, &audio_if) < 0) { in sunstartwrite()
318 ioctl(pPriv->device, AUDIO_SETINFO, &audio_if); in sunstartwrite()
336 pPriv->cOutput = sox_globals.bufsiz >> pPriv->sample_shift; in sunstartwrite()
337 pPriv->pOutput = lsx_malloc((size_t)pPriv->cOutput << pPriv->sample_shift); in sunstartwrite()
344 priv_t* pPriv = (priv_t*)ft->priv; in sunstop() local
345 if (pPriv->device >= 0) { in sunstop()
346 close(pPriv->device); in sunstop()
348 if (pPriv->pOutput) { in sunstop()
349 free(pPriv->pOutput); in sunstop()
365 priv_t* pPriv = (priv_t*)ft->priv; in sunread() local
367 size_t cbOutputLeft = cOutput << pPriv->sample_shift; in sunread()
374 cbRead = read(pPriv->device, pbOutput, cbOutputLeft); in sunread()
387 cRead = cOutput - (cbOutputLeft >> pPriv->sample_shift); in sunread()
388 switch (pPriv->sample_shift) in sunread()
435 priv_t* pPriv = (priv_t*)ft->priv; in sunwrite() local
447 if (cStride > pPriv->cOutput) { in sunwrite()
448 cStride = pPriv->cOutput; in sunwrite()
451 switch (pPriv->sample_shift) in sunwrite()
458 ((sox_uint8_t*)pPriv->pOutput)[i] = in sunwrite()
464 ((sox_uint8_t*)pPriv->pOutput)[i] = in sunwrite()
470 ((sox_uint8_t*)pPriv->pOutput)[i] = in sunwrite()
480 ((sox_int16_t*)pPriv->pOutput)[i] = in sunwrite()
486 cbStride = cStride << pPriv->sample_shift; in sunwrite()
489 cbWritten = write(pPriv->device, &pPriv->pOutput[i], cbStride - i); in sunwrite()