OsStatus MprToneGen::setFlowGraph(MpFlowGraphBase* pFlowGraph) { OsStatus res = MpAudioResource::setFlowGraph(pFlowGraph); if (res == OS_SUCCESS) { // Check are we added to flowgraph or removed. if (pFlowGraph != NULL) { mpToneGenState = MpToneGen_MpToneGen(mpFlowGraph->getSamplesPerSec(), mpLocale); } else { MpToneGen_delete(mpToneGenState); } } return res; }
// Destructor MprToneGen::~MprToneGen() { MpToneGen_delete(mpToneGenState); }