myactive.cpp

来自「手机操作系统Symbian支持混音功能的声音引擎代码」· C++ 代码 · 共 54 行

CPP
54
字号
/*
 * ============================================================================
 *  Name     : MyActive.cpp
 *  Part of  : SoundMixer
 *  Created  : 03/30/2006 by Forum Nokia
 *  Description:
 *     This is the project specification file for SoundMixer.
 *  Version  : 2.0.0
 *  Copyright: Forum Nokia
 * ============================================================================
 */

#include <e32base.h>
#include "MyActive.h"
#include "CMixerThread.h"

// Constructs and sets priority
MyActive::MyActive(CMixerThread* aThread):
CActive(CActive::EPriorityStandard),iThread(aThread)
  {
  // adds the active to the queue
  CActiveScheduler::Add(this) ; 
  }


// Cancels this task
void MyActive::DoCancel()
  {
    TRequestStatus* status = &iStatus;
    RThread().RequestComplete(status,KErrCancel);
  }


// Request accepting function
void MyActive::Request()
  {
  SetActive();  
  iStatus = KRequestPending;
  }


// Informs the requestor that there is a user activity
// or timer is fired
void MyActive::RunL()
  {
  if(iStatus == KErrNone)
      {
      iThread->HandleExceptionL();
      Request();
      }
  }

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?