Home | History | Annotate | Download | only in lib_src

Lines Matching refs:pStream

84 static EAS_RESULT EAS_ParseEvents (S_EAS_DATA *pEASData, S_EAS_STREAM *pStream, EAS_U32 endTime, EAS_INT parseMode);
93 * pStream - stream handle
98 EAS_RESULT EAS_SetStreamParameter (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_I32 param, EAS_I32 value)
102 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
104 return (*pParserModule->pfSetData)(pEASData, pStream->handle, param, value);
115 * pStream - stream handle
120 EAS_RESULT EAS_GetStreamParameter (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_I32 param, EAS_I32 *pValue)
124 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
126 return (*pParserModule->pfGetData)(pEASData, pStream->handle, param, pValue);
140 EAS_BOOL EAS_StreamReady (S_EAS_DATA *pEASData, EAS_HANDLE pStream)
145 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
146 if (pParserModule->pfState(pEASData, pStream->handle, &state) != EAS_SUCCESS)
161 EAS_RESULT EAS_IntSetStrmParam (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_INT param, EAS_I32 value)
166 if (EAS_SetStreamParameter(pEASData, pStream, param, value) == EAS_SUCCESS)
171 if (EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_SYNTH_HANDLE, (EAS_I32*) &pSynth) != EAS_SUCCESS)
227 EAS_RESULT EAS_IntGetStrmParam (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_INT param, EAS_I32 *pValue)
232 if (EAS_GetStreamParameter(pEASData, pStream, param, pValue) == EAS_SUCCESS)
237 if (EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_SYNTH_HANDLE, (EAS_I32*) &pSynth) != EAS_SUCCESS)
318 static void EAS_InitStream (S_EAS_STREAM *pStream, EAS_VOID_PTR pParserModule, EAS_VOID_PTR streamHandle)
320 pStream->pParserModule = pParserModule;
321 pStream->handle = streamHandle;
322 pStream->time = 0;
323 pStream->frameLength = AUDIO_FRAME_LENGTH;
324 pStream->repeatCount = 0;
325 pStream->volume = DEFAULT_STREAM_VOLUME;
326 pStream->streamFlags = 0;
757 * pStream - stream handle
761 EAS_PUBLIC EAS_RESULT EAS_GetWaveFmtChunk (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_VOID_PTR *ppFmtChunk)
766 if ((result = EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_FORMAT, &value)) != EAS_SUCCESS)
779 * pStream - stream handle
783 EAS_PUBLIC EAS_RESULT EAS_GetFileType (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_I32 *pFileType)
785 if (!EAS_StreamReady (pEASData, pStream))
787 return EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_FILE_TYPE, pFileType);
808 EAS_PUBLIC EAS_RESULT EAS_Prepare (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
814 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
819 result = pParserModule->pfState(pEASData, pStream->handle, &state);
825 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
826 result = (*pParserModule->pfPrepare)(pEASData, pStream->handle);
830 result = EAS_SetVolume(pEASData, pStream, pStream->volume);
1120 EAS_PUBLIC EAS_RESULT EAS_SetRepeat (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 repeatCount)
1122 pStream->repeatCount = repeatCount;
1148 EAS_PUBLIC EAS_RESULT EAS_GetRepeat (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *pRepeatCount)
1150 *pRepeatCount = pStream->repeatCount;
1172 EAS_PUBLIC EAS_RESULT EAS_SetPlaybackRate (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_U32 rate)
1186 pStream->frameLength = (AUDIO_FRAME_LENGTH * (rate >> 8)) >> 20;
1189 EAS_SetStreamParameter(pEASData, pStream, PARSER_DATA_PLAYBACK_RATE, (EAS_I32) rate);
1212 EAS_PUBLIC EAS_RESULT EAS_SetTransposition (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 transposition)
1219 if (!EAS_StreamReady(pEASData, pStream))
1221 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_TRANSPOSITION, transposition);
1240 static EAS_RESULT EAS_ParseEvents (S_EAS_DATA *pEASData, EAS_HANDLE pStream, EAS_U32 endTime, EAS_INT parseMode)
1250 pParserModule = pStream->pParserModule;
1254 if ((result = (*pParserModule->pfState)(pEASData, pStream->handle, &parserState)) != EAS_SUCCESS)
1258 pStream->time += pStream->frameLength;
1265 pStream->streamFlags &= ~STREAM_FLAGS_PARSED;
1273 if ((result = (*pParserModule->pfState)(pEASData, pStream->handle, &parserState)) != EAS_SUCCESS)
1279 pStream->time = time << 8;
1287 if ((result = (*pParserModule->pfTime)(pEASData, pStream->handle, &time)) != EAS_SUCCESS)
1296 if ((result = (*pParserModule->pfEvent)(pEASData, pStream->handle, parseMode)) != EAS_SUCCESS)
1303 pStream->time = endTime;
1329 pStream->streamFlags |= STREAM_FLAGS_PARSED;
1352 EAS_PUBLIC EAS_RESULT EAS_ParseMetaData (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *playLength)
1358 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
1363 if ((result = (*pParserModule->pfState)(pEASData, pStream->handle, &state)) != EAS_SUCCESS)
1370 return pParserModule->pfGetMetaData(pEASData, pStream->handle, playLength);
1373 if ((result = (*pParserModule->pfReset)(pEASData, pStream->handle)) != EAS_SUCCESS)
1377 pStream->time = 0;
1379 if ((result = EAS_ParseEvents(pEASData, pStream, 0x7fffffff, eParserModeMetaData)) != EAS_SUCCESS)
1383 if ((result = EAS_GetLocation(pEASData, pStream, playLength)) != EAS_SUCCESS)
1387 pStream->time = 0;
1388 return (*pParserModule->pfReset)(pEASData, pStream->handle);
1413 EAS_HANDLE pStream,
1421 if (!EAS_StreamReady(pEASData, pStream))
1429 return EAS_SetStreamParameter(pEASData, pStream, PARSER_DATA_METADATA_CB, (EAS_I32) &metadata);
1438 EAS_PUBLIC EAS_RESULT EAS_GetNoteCount (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *pNoteCount)
1440 if (!EAS_StreamReady(pEASData, pStream))
1442 return EAS_IntGetStrmParam(pEASData, pStream, PARSER_DATA_NOTE_COUNT, pNoteCount);
1463 EAS_PUBLIC EAS_RESULT EAS_CloseFile (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
1469 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
1473 result = (*pParserModule->pfClose)(pEASData, pStream->handle);
1476 pStream->handle = NULL;
1477 pStream->pParserModule = NULL;
1574 EAS_PUBLIC EAS_RESULT EAS_WriteMIDIStream (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_U8 *pBuffer, EAS_I32 count)
1579 pMIDIStream = (S_INTERACTIVE_MIDI*) pStream->handle;
1610 EAS_PUBLIC EAS_RESULT EAS_CloseMIDIStream (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
1614 pMIDIStream = (S_INTERACTIVE_MIDI*) pStream->handle;
1627 pStream->handle = NULL;
1648 EAS_PUBLIC EAS_RESULT EAS_State (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_STATE *pState)
1654 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
1658 if ((result = (*pParserModule->pfState)(pEASData, pStream->handle, pState)) != EAS_SUCCESS)
1662 if (pStream->repeatCount && (*pState == EAS_STATE_STOPPED))
1670 if (pStream->streamFlags & STREAM_FLAGS_PAUSE)
1672 if (pStream->streamFlags & STREAM_FLAGS_LOCATE)
1679 if (pStream->streamFlags & STREAM_FLAGS_RESUME)
1703 EAS_PUBLIC EAS_RESULT EAS_SetPolyphony (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 polyphonyCount)
1705 if (!EAS_StreamReady(pEASData, pStream))
1707 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_POLYPHONY, polyphonyCount);
1727 EAS_PUBLIC EAS_RESULT EAS_GetPolyphony (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *pPolyphonyCount)
1729 if (!EAS_StreamReady(pEASData, pStream))
1731 return EAS_IntGetStrmParam(pEASData, pStream, PARSER_DATA_POLYPHONY, pPolyphonyCount);
1800 EAS_PUBLIC EAS_RESULT EAS_SetPriority (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 priority)
1802 if (!EAS_StreamReady(pEASData, pStream))
1804 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_PRIORITY, priority);
1824 EAS_PUBLIC EAS_RESULT EAS_GetPriority (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *pPriority)
1826 if (!EAS_StreamReady(pEASData, pStream))
1828 return EAS_IntGetStrmParam(pEASData, pStream, PARSER_DATA_PRIORITY, pPriority);
1850 EAS_PUBLIC EAS_RESULT EAS_SetVolume (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 volume)
1859 if (pStream != NULL)
1864 if (!EAS_StreamReady(pEASData, pStream))
1868 pStream->volume = (EAS_U8) volume;
1869 result = EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_GAIN_OFFSET, &gainOffset);
1877 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_VOLUME, gain);
1912 EAS_PUBLIC EAS_I32 EAS_GetVolume (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
1914 if (pStream == NULL)
1917 if (!EAS_StreamReady(pEASData, pStream))
1919 return pStream->volume;
1960 EAS_PUBLIC EAS_RESULT EAS_SetMaxPCMStreams (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 maxNumStreams)
1962 if (!EAS_StreamReady(pEASData, pStream))
1964 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_MAX_PCM_STREAMS, maxNumStreams);
1988 EAS_PUBLIC EAS_RESULT EAS_Locate (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 milliseconds, EAS_BOOL offset)
1996 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
2000 if ((result = (*pParserModule->pfState)(pEASData, pStream->handle, &state)) != EAS_SUCCESS)
2008 milliseconds += (EAS_I32) pStream->time >> 8;
2014 if (requestedTime == (pStream->time >> 8))
2018 pStream->streamFlags |= STREAM_FLAGS_LOCATE;
2024 result = pParserModule->pfLocate(pEASData, pStream->handle, (EAS_I32) requestedTime, &parserLocate);
2028 pStream->time = requestedTime << 8;
2034 if (((state == EAS_STATE_PAUSING) || (state == EAS_STATE_PAUSED)) && ((pStream->streamFlags & STREAM_FLAGS_RESUME) == 0))
2035 pStream->streamFlags |= STREAM_FLAGS_PAUSE;
2038 if ((result = (*pParserModule->pfReset)(pEASData, pStream->handle)) != EAS_SUCCESS)
2040 pStream->time = 0;
2043 if ((result = EAS_ParseEvents(pEASData, pStream, requestedTime << 8, eParserModeLocate)) != EAS_SUCCESS)
2068 EAS_PUBLIC EAS_RESULT EAS_GetLocation (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 *pTime)
2070 if (!EAS_StreamReady(pEASData, pStream))
2073 *pTime = pStream->time >> 8;
2119 EAS_PUBLIC EAS_RESULT EAS_Pause (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
2125 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
2130 result = pParserModule->pfState(pEASData, pStream->handle, &state);
2133 if ((state != EAS_STATE_PLAY) && (state != EAS_STATE_READY) && ((pStream->streamFlags & STREAM_FLAGS_RESUME) == 0))
2141 pStream->streamFlags &= ~STREAM_FLAGS_RESUME;
2144 pStream->streamFlags |= STREAM_FLAGS_PAUSE;
2149 result = pParserModule->pfPause(pEASData, pStream->handle);
2177 EAS_PUBLIC EAS_RESULT EAS_Resume (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream)
2183 pParserModule = (S_FILE_PARSER_INTERFACE*) pStream->pParserModule;
2188 result = pParserModule->pfState(pEASData, pStream->handle, &state);
2191 if ((state != EAS_STATE_PAUSED) && (state != EAS_STATE_PAUSING) && ((pStream->streamFlags & STREAM_FLAGS_PAUSE) == 0))
2199 pStream->streamFlags &= ~STREAM_FLAGS_PAUSE;
2202 pStream->streamFlags |= STREAM_FLAGS_RESUME;
2207 result = pParserModule->pfResume(pEASData, pStream->handle);
2354 EAS_PUBLIC EAS_RESULT EAS_SetSoundLibrary (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_SNDLIB_HANDLE pSndLib)
2356 if (pStream)
2358 if (!EAS_StreamReady(pEASData, pStream))
2360 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_EAS_LIBRARY, (EAS_I32) pSndLib);
2402 EAS_PUBLIC EAS_RESULT EAS_SetPlayMode (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_I32 playMode)
2404 return EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_PLAY_MODE, playMode);
2425 EAS_PUBLIC EAS_RESULT EAS_LoadDLSCollection (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_FILE_LOCATOR locator)
2431 if (pStream != NULL)
2433 if (!EAS_StreamReady(pEASData, pStream))
2448 /* if a stream pStream is specified, point it to the DLS collection */
2449 if (pStream)
2450 result = EAS_IntSetStrmParam(pEASData, pStream, PARSER_DATA_DLS_COLLECTION, (EAS_I32) pDLS);
2482 EAS_HANDLE pStream,
2489 if (!EAS_StreamReady(pEASData, pStream))
2492 if (EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_SYNTH_HANDLE, (EAS_I32*) &pSynth) != EAS_SUCCESS)
2520 EAS_PUBLIC EAS_RESULT EAS_GetMIDIControllers (EAS_DATA_HANDLE pEASData, EAS_HANDLE pStream, EAS_U8 channel, S_MIDI_CONTROLLERS *pControl)
2524 if (!EAS_StreamReady(pEASData, pStream))
2527 if (EAS_GetStreamParameter(pEASData, pStream, PARSER_DATA_SYNTH_HANDLE, (EAS_I32*) &pSynth) != EAS_SUCCESS)