Lines Matching refs:pXMFData
69 static EAS_RESULT XMF_FindFileContents (EAS_HW_DATA_HANDLE hwInstData, S_XMF_DATA *pXMFData);
70 static EAS_RESULT XMF_ReadNode (EAS_HW_DATA_HANDLE hwInstData, S_XMF_DATA *pXMFData, EAS_I32 nodeOf…
122 S_XMF_DATA *pXMFData; in XMF_CheckFileType() local
173 pXMFData = EAS_CMEnumData(EAS_CM_XMF_DATA); in XMF_CheckFileType()
175 pXMFData = EAS_HWMalloc(pEASData->hwInstData, sizeof(S_XMF_DATA)); in XMF_CheckFileType()
176 if (!pXMFData) in XMF_CheckFileType()
180 EAS_HWMemSet((void *)pXMFData,0, sizeof(S_XMF_DATA)); in XMF_CheckFileType()
182 pXMFData->fileHandle = fileHandle; in XMF_CheckFileType()
183 pXMFData->fileOffset = offset; in XMF_CheckFileType()
186 if ((result = XMF_FindFileContents(pEASData->hwInstData, pXMFData)) != EAS_SUCCESS) in XMF_CheckFileType()
189 EAS_HWFree(pEASData->hwInstData, pXMFData); in XMF_CheckFileType()
194 …if ((result = EAS_HWFileSeek(pEASData->hwInstData, fileHandle, pXMFData->midiOffset)) != EAS_SUCCE… in XMF_CheckFileType()
195 EAS_HWFree(pEASData->hwInstData, pXMFData); in XMF_CheckFileType()
198 …if ((result = SMF_CheckFileType(pEASData, fileHandle, &pXMFData->pSMFData, pXMFData->midiOffset)) … in XMF_CheckFileType()
199 EAS_HWFree(pEASData->hwInstData, pXMFData); in XMF_CheckFileType()
202 *ppHandle = pXMFData; in XMF_CheckFileType()
226 S_XMF_DATA* pXMFData; in XMF_Prepare() local
230 pXMFData = (S_XMF_DATA*) pInstData; in XMF_Prepare()
231 if (pXMFData->dlsOffset != 0) in XMF_Prepare()
233 …if ((result = DLSParser(pEASData->hwInstData, pXMFData->fileHandle, pXMFData->dlsOffset, &pXMFData… in XMF_Prepare()
241 if ((result = SMF_Prepare(pEASData, pXMFData->pSMFData)) != EAS_SUCCESS) in XMF_Prepare()
245 if (pXMFData->pDLS == NULL) in XMF_Prepare()
249 result = VMSetDLSLib(((S_SMF_DATA*) pXMFData->pSMFData)->pSynth, pXMFData->pDLS); in XMF_Prepare()
252 DLSAddRef(pXMFData->pDLS); in XMF_Prepare()
253 VMInitializeAllChannels(pEASData->pVoiceMgr, ((S_SMF_DATA*) pXMFData->pSMFData)->pSynth); in XMF_Prepare()
345 S_XMF_DATA* pXMFData; in XMF_Close() local
348 pXMFData = (S_XMF_DATA *)pInstData; in XMF_Close()
351 if ((result = SMF_Close(pEASData, pXMFData->pSMFData)) != EAS_SUCCESS) in XMF_Close()
354 if (pXMFData->pDLS) in XMF_Close()
355 DLSCleanup(pEASData->hwInstData, pXMFData->pDLS); in XMF_Close()
361 EAS_HWFree(pEASData->hwInstData, pXMFData); in XMF_Close()
516 static EAS_RESULT XMF_FindFileContents (EAS_HW_DATA_HANDLE hwInstData, S_XMF_DATA *pXMFData) in XMF_FindFileContents() argument
528 pXMFData->dlsOffset = pXMFData->midiOffset = 0; in XMF_FindFileContents()
541 pXMFData->fileHandle, in XMF_FindFileContents()
550 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingBytes, &value)) != EAS_SUCCE… in XMF_FindFileContents()
554 if ((result = EAS_HWFileSeekOfs(hwInstData, pXMFData->fileHandle, value)) != EAS_SUCCESS) in XMF_FindFileContents()
559 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingBytes, &treeStart)) != EAS_S… in XMF_FindFileContents()
564 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingBytes, &treeEnd)) != EAS_SUC… in XMF_FindFileContents()
569 …if ((result = XMF_ReadNode(hwInstData, pXMFData, treeStart, treeEnd + 1, &length, node_depth)) != … in XMF_FindFileContents()
573 if (pXMFData->midiOffset == 0) in XMF_FindFileContents()
580 if ((pXMFData->dlsOffset > 0) && (pXMFData->midiOffset < pXMFData->dlsOffset)) in XMF_FindFileContents()
600 static EAS_RESULT XMF_ReadNode (EAS_HW_DATA_HANDLE hwInstData, S_XMF_DATA *pXMFData, EAS_I32 nodeOf… in XMF_ReadNode() argument
620 if ((result = EAS_HWFileSeek(hwInstData, pXMFData->fileHandle, nodeOffset)) != EAS_SUCCESS) in XMF_ReadNode()
624 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, pLength)) != EA… in XMF_ReadNode()
638 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, &numItems)) != … in XMF_ReadNode()
644 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, &headerLength))… in XMF_ReadNode()
650 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, &length)) != EA… in XMF_ReadNode()
656 if ((result = EAS_HWFilePos(hwInstData, pXMFData->fileHandle, &offset)) != EAS_SUCCESS) in XMF_ReadNode()
664 …if ((result = EAS_HWFileSeek(hwInstData, pXMFData->fileHandle, nodeOffset + headerLength)) != EAS_… in XMF_ReadNode()
669 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, &refType)) != E… in XMF_ReadNode()
673 if ((result = EAS_HWFilePos(hwInstData, pXMFData->fileHandle, &offset)) != EAS_SUCCESS) in XMF_ReadNode()
683 …if ((result = XMF_ReadVLQ(hwInstData, pXMFData->fileHandle, &remainingInlineBytes, &offset)) != EA… in XMF_ReadNode()
685 offset += pXMFData->fileOffset; in XMF_ReadNode()
686 if ((result = EAS_HWFileSeek(hwInstData, pXMFData->fileHandle, offset)) != EAS_SUCCESS) in XMF_ReadNode()
700 …if ((result = EAS_HWGetDWord(hwInstData, pXMFData->fileHandle, &chunkType, EAS_TRUE)) != EAS_SUCCE… in XMF_ReadNode()
707 if ((result = EAS_HWFileSeekOfs(hwInstData, pXMFData->fileHandle, 4)) != EAS_SUCCESS) in XMF_ReadNode()
711 …if ((result = EAS_HWGetDWord(hwInstData, pXMFData->fileHandle, &chunkType, EAS_TRUE)) != EAS_SUCCE… in XMF_ReadNode()
714 pXMFData->dlsOffset = offset; in XMF_ReadNode()
719 pXMFData->midiOffset = offset; in XMF_ReadNode()
728 …if ((result = XMF_ReadNode(hwInstData, pXMFData, offset, endOffset, &length, depth+1)) != EAS_SUCC… in XMF_ReadNode()
733 if ((result = EAS_HWFileSeek(hwInstData, pXMFData->fileHandle, offset)) != EAS_SUCCESS) in XMF_ReadNode()
762 static EAS_RESULT XMF_FindFileContents(S_EAS_DATA *pEASData, S_XMF_DATA *pXMFData, EAS_FILE_HANDLE …
773 pXMFData->dlsOffset = 0;
866 … if (pXMFData->dlsOffset == 0 && id[0] == 'R' && id[1] == 'I' && id[2] == 'F' && id[3] == 'F')
869 pXMFData->dlsOffset = location;
876 pXMFData->midiOffset = location;