Esempio n. 1
0
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;
}
Esempio n. 2
0
// Destructor
MprToneGen::~MprToneGen()
{
   MpToneGen_delete(mpToneGenState);
}