Extension::Extension(LPRDATA _rdPtr, LPEDATA edPtr, fpcob cobPtr) : rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.hoAdRunHeader), Runtime(_rdPtr) { /* Link all your action/condition/expression functions to their IDs to match the IDs in the JSON here */ LinkAction(0, ChangeTempo); LinkAction(1, ChangePitch); LinkAction(2, ChangePlayBackRate); LinkCondition(0, OnError); LinkExpression(0, GetVersion); LinkExpression(1, LastError); /* This is where you'd do anything you'd do in CreateRunObject in the original SDK It's the only place you'll get access to edPtr at runtime, so you should transfer anything from edPtr to the extension class here. */ sndVersion = soundtouch_getVersionId(); _snwprintf_s(lastError, _countof(lastError),ERRORSIZE,ErrorS[noError]); _snwprintf_s(errorTemp, _countof(errorTemp),ERRORSIZE,ErrorS[noError]); sampleRate=0; channels=0; speechEnabled=edPtr->speechEnabled; }
unsigned int SoundTouch::getVersionId() { return soundtouch_getVersionId(); }