Lines Matching refs:sdFile

1511 extern picoos_bool picoos_sdfOpenIn(picoos_Common g, picoos_SDFile * sdFile,  in picoos_sdfOpenIn()  argument
1522 (*sdFile) = NULL; in picoos_sdfOpenIn()
1559 (*sdFile) = sdf; in picoos_sdfOpenIn()
1569 (*sdFile) = NULL; in picoos_sdfOpenIn()
1575 static void picoos_sdfLoadSamples(picoos_SDFile sdFile, in picoos_sdfLoadSamples() argument
1578 picoos_sd_file_t * sdf = sdFile; in picoos_sdfLoadSamples()
1580 switch (sdFile->enc) { in picoos_sdfLoadSamples()
1600 picoos_SDFile sdFile, in picoos_sdfGetSamples() argument
1612 if (NULL == sdFile) { in picoos_sdfGetSamples()
1615 if (start >= sdFile->nrFileSamples) { in picoos_sdfGetSamples()
1616 if (start > sdFile->nrFileSamples) { in picoos_sdfGetSamples()
1621 if (((start + (*nrSamples)) > sdFile->nrFileSamples)) { in picoos_sdfGetSamples()
1622 (*nrSamples) = (sdFile->nrFileSamples - start); in picoos_sdfGetSamples()
1624 if ((sdFile->enc == PICOOS_ENC_LIN)) { in picoos_sdfGetSamples()
1629 picoos_SetPos(sdFile->file,(sdFile->hdrSize + (b * start))); in picoos_sdfGetSamples()
1636 picoos_sdfLoadSamples(sdFile, &n); in picoos_sdfGetSamples()
1639 samples[j] = sdFile->buf[i]; in picoos_sdfGetSamples()
1653 extern picoos_bool picoos_sdfCloseIn (picoos_Common g, picoos_SDFile * sdFile) in picoos_sdfCloseIn() argument
1655 if (NULL != (*sdFile)) { in picoos_sdfCloseIn()
1656 picoos_CloseBinary(g,&((*sdFile)->file)); in picoos_sdfCloseIn()
1657 picoos_deallocate(g->mm,(void *)sdFile); in picoos_sdfCloseIn()
1722 extern picoos_bool picoos_sdfOpenOut(picoos_Common g, picoos_SDFile * sdFile, in picoos_sdfOpenOut() argument
1728 (*sdFile) = NULL; in picoos_sdfOpenOut()
1770 (*sdFile) = sdf; in picoos_sdfOpenOut()
1781 (*sdFile) = NULL; in picoos_sdfOpenOut()
1786 static picoos_bool picoos_sdfFlushOutBuf(picoos_SDFile sdFile) in picoos_sdfFlushOutBuf() argument
1792 if (!(sdFile->aborted)) { in picoos_sdfFlushOutBuf()
1793 nrSamples = sdFile->bufPos; in picoos_sdfFlushOutBuf()
1794 switch (sdFile->enc) { in picoos_sdfFlushOutBuf()
1796 arr_conv_int16_le(sdFile->buf, 0, nrSamples, sdFile->bBuf, 0); in picoos_sdfFlushOutBuf()
1798 done = picoos_WriteBytes(sdFile->file, sdFile->bBuf, &len) in picoos_sdfFlushOutBuf()
1807 sdFile->nrFileSamples = (sdFile->nrFileSamples + nrSamples); in picoos_sdfFlushOutBuf()
1810 sdFile->bufPos = 0; in picoos_sdfFlushOutBuf()
1814 extern picoos_bool picoos_sdfFlushOutput(picoos_SDFile sdFile) in picoos_sdfFlushOutput() argument
1816 if ((sdFile != NULL) && !(sdFile->aborted) && (sdFile->bufPos > 0)) { in picoos_sdfFlushOutput()
1817 return picoos_sdfFlushOutBuf(sdFile); in picoos_sdfFlushOutput()
1824 extern picoos_bool picoos_sdfPutSamples (picoos_SDFile sdFile, picoos_uint32 nrSamples, picoos_int1… in picoos_sdfPutSamples() argument
1830 if ((sdFile != NULL) && !(sdFile->aborted)) { in picoos_sdfPutSamples()
1839 sdFile->buf[sdFile->bufPos++] = s; in picoos_sdfPutSamples()
1840 if (sdFile->bufPos >= PICOOS_SDF_BUF_LEN) { in picoos_sdfPutSamples()
1841 done = picoos_sdfFlushOutBuf(sdFile); in picoos_sdfPutSamples()
1851 extern picoos_bool picoos_sdfCloseOut (picoos_Common g, picoos_SDFile * sdFile) in picoos_sdfCloseOut() argument
1857 if (NULL != (*sdFile)) { in picoos_sdfCloseOut()
1858 if (!((*sdFile)->aborted) && ((*sdFile)->bufPos > 0)) { in picoos_sdfCloseOut()
1859 done = picoos_sdfFlushOutBuf(*sdFile); in picoos_sdfCloseOut()
1861 if (FILE_TYPE_WAV == (*sdFile)->fileType) { in picoos_sdfCloseOut()
1862 done = picoos_writeWavHeader((*sdFile)->file, (*sdFile)->sf, in picoos_sdfCloseOut()
1863 (*sdFile)->enc, (*sdFile)->nrFileSamples, &hdrSize); in picoos_sdfCloseOut()
1865 done = picoos_CloseBinary(g, &((*sdFile)->file)); in picoos_sdfCloseOut()
1866 picoos_deallocate(g->mm, (void *) sdFile); in picoos_sdfCloseOut()