Lines Matching refs:pWaveData
89 …RESULT WaveParseHeader (S_EAS_DATA *pEASData, EAS_FILE_HANDLE fileHandle, S_WAVE_STATE *pWaveData);
93 …FmtChunk (S_EAS_DATA *pEASData, EAS_FILE_HANDLE fileHandle, S_WAVE_STATE *pWaveData, EAS_I32 size);
139 S_WAVE_STATE *pWaveData; in WaveCheckFileType() local
150 pWaveData = EAS_CMEnumData(EAS_CM_WAVE_DATA); in WaveCheckFileType()
152 pWaveData = EAS_HWMalloc(pEASData->hwInstData, sizeof(S_WAVE_STATE)); in WaveCheckFileType()
153 if (!pWaveData) in WaveCheckFileType()
155 EAS_HWMemSet(pWaveData, 0, sizeof(S_WAVE_STATE)); in WaveCheckFileType()
158 pWaveData->fileHandle = fileHandle; in WaveCheckFileType()
159 pWaveData->fileOffset = offset; in WaveCheckFileType()
160 *pHandle = pWaveData; in WaveCheckFileType()
185 S_WAVE_STATE *pWaveData; in WavePrepare() local
189 pWaveData = (S_WAVE_STATE*) pInstData; in WavePrepare()
190 if (pWaveData->streamHandle != NULL) in WavePrepare()
194 pWaveData->time = 0; in WavePrepare()
195 …if ((result = EAS_HWFileSeek(pEASData->hwInstData, pWaveData->fileHandle, pWaveData->fileOffset)) … in WavePrepare()
199 if ((result = WaveParseHeader(pEASData, pWaveData->fileHandle, pWaveData)) != EAS_SUCCESS) in WavePrepare()
227 S_WAVE_STATE *pWaveData; in WaveState() local
230 pWaveData = (S_WAVE_STATE*) pInstData; in WaveState()
231 if (pWaveData->streamHandle) in WaveState()
232 return EAS_PEState(pEASData, pWaveData->streamHandle, pState); in WaveState()
235 if (pWaveData->time > 0) in WaveState()
261 S_WAVE_STATE *pWaveData; in WaveClose() local
264 pWaveData = (S_WAVE_STATE*) pInstData; in WaveClose()
267 if (pWaveData->streamHandle) in WaveClose()
269 if ((result = EAS_PEClose(pEASData, pWaveData->streamHandle)) != EAS_SUCCESS) in WaveClose()
271 pWaveData->streamHandle = NULL; in WaveClose()
280 if (pWaveData->fmtChunk != NULL) in WaveClose()
281 EAS_HWFree(pEASData->hwInstData, pWaveData->fmtChunk); in WaveClose()
285 EAS_HWFree(pEASData->hwInstData, pWaveData); in WaveClose()
428 S_WAVE_STATE *pWaveData = (S_WAVE_STATE*) pInstData; in WaveSetData() local
434 EAS_HWMemCpy(&pWaveData->metadata, (void*) value, sizeof(S_METADATA_CB)); in WaveSetData()
439 return EAS_PEUpdatePitch(pEASData, pWaveData->streamHandle, (EAS_I16) value); in WaveSetData()
442 return EAS_PEUpdateVolume(pEASData, pWaveData->streamHandle, (EAS_I16) value); in WaveSetData()
468 S_WAVE_STATE *pWaveData; in WaveGetData() local
470 pWaveData = (S_WAVE_STATE*) pInstData; in WaveGetData()
475 *pValue = pWaveData->fileType; in WaveGetData()
481 *pValue = (EAS_I32) pWaveData->fmtChunk; in WaveGetData()
513 …_RESULT WaveParseHeader (S_EAS_DATA *pEASData, EAS_FILE_HANDLE fileHandle, S_WAVE_STATE *pWaveData) in WaveParseHeader() argument
557 if (pWaveData == NULL) in WaveParseHeader()
561 pWaveData->flags = 0; in WaveParseHeader()
562 pWaveData->mediaLength = -1; in WaveParseHeader()
563 pWaveData->infoChunkPos = -1; in WaveParseHeader()
564 pWaveData->infoChunkSize = -1; in WaveParseHeader()
567 pWaveData->flags |= PCM_FLAGS_STREAMING; in WaveParseHeader()
592 … if ((result = SaveFmtChunk(pEASData, fileHandle, pWaveData, (EAS_I32) size)) != EAS_SUCCESS) in WaveParseHeader()
602 pWaveData->fileType = EAS_FILE_WAVE_PCM; in WaveParseHeader()
607 pWaveData->fileType = EAS_FILE_WAVE_IMA_ADPCM; in WaveParseHeader()
616 pWaveData->flags |= PCM_FLAGS_STEREO; in WaveParseHeader()
641 pWaveData->flags |= PCM_FLAGS_8_BIT | PCM_FLAGS_UNSIGNED; in WaveParseHeader()
649 if ((usTemp != 4) || (pWaveData->flags & PCM_FLAGS_STEREO)) in WaveParseHeader()
657 if (pWaveData->flags & PCM_FLAGS_STREAMING) in WaveParseHeader()
668 pWaveData->mediaLength = (EAS_I32) ((size * 1000) / avgBytesPerSec); in WaveParseHeader()
670 pWaveData->mediaLength = (EAS_I32) (size / (avgBytesPerSec / 1000)); in WaveParseHeader()
680 pWaveData->infoChunkPos = pos + 4; in WaveParseHeader()
681 pWaveData->infoChunkSize = (EAS_I32) size - 4; in WaveParseHeader()
724 pWaveData->audioOffset = audioOffset; in WaveParseHeader()
725 params.flags = pWaveData->flags; in WaveParseHeader()
732 return EAS_PEOpenStream(pEASData, ¶ms, &pWaveData->streamHandle); in WaveParseHeader()
744 S_WAVE_STATE *pWaveData; in WaveGetMetaData() local
755 pWaveData = (S_WAVE_STATE*) pInstData; in WaveGetMetaData()
758 *pMediaLength = pWaveData->mediaLength; in WaveGetMetaData()
761 if (pWaveData->infoChunkPos < 0) in WaveGetMetaData()
764 …if ((result = EAS_HWFilePos(pEASData->hwInstData, pWaveData->fileHandle, &restorePos)) != EAS_SUCC… in WaveGetMetaData()
768 pos = pWaveData->infoChunkPos; in WaveGetMetaData()
769 infoSize = pWaveData->infoChunkSize; in WaveGetMetaData()
776 … if ((result = EAS_HWFileSeek(pEASData->hwInstData, pWaveData->fileHandle, pos)) != EAS_SUCCESS) in WaveGetMetaData()
780 …if ((result = EAS_HWGetDWord(pEASData->hwInstData, pWaveData->fileHandle, &tag, EAS_TRUE)) != EAS_… in WaveGetMetaData()
782 …if ((result = EAS_HWGetDWord(pEASData->hwInstData, pWaveData->fileHandle, &size, EAS_FALSE)) != EA… in WaveGetMetaData()
811 metaLen = pWaveData->metadata.bufferSize - 1; in WaveGetMetaData()
814 …if ((result = EAS_HWReadFile(pEASData->hwInstData, pWaveData->fileHandle, pWaveData->metadata.buff… in WaveGetMetaData()
816 pWaveData->metadata.buffer[metaLen] = 0; in WaveGetMetaData()
817 … pWaveData->metadata.callback(metaType, pWaveData->metadata.buffer, pWaveData->metadata.pUserData); in WaveGetMetaData()
831 return EAS_HWFileSeek(pEASData->hwInstData, pWaveData->fileHandle, restorePos); in WaveGetMetaData()
842 …tChunk (S_EAS_DATA *pEASData, EAS_FILE_HANDLE fileHandle, S_WAVE_STATE *pWaveData, EAS_I32 fmtSize) in SaveFmtChunk() argument
853 pWaveData->fmtChunk = EAS_HWMalloc(pEASData->hwInstData, fmtSize); in SaveFmtChunk()
854 if (!pWaveData->fmtChunk) in SaveFmtChunk()
858 …if ((result = EAS_HWReadFile(pEASData->hwInstData, fileHandle, pWaveData->fmtChunk, fmtSize, &coun… in SaveFmtChunk()