• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsInitialized函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IsInitialized函数的典型用法代码示例。如果您正苦于以下问题:C++ IsInitialized函数的具体用法?C++ IsInitialized怎么用?C++ IsInitialized使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IsInitialized函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Connect

int CIpSocket::Connect( const t_string &x_sAddress, unsigned int x_uPort )
{
	if ( !x_sAddress.length() )
        return 0;

	// Punt if not initialized
	if ( !IsInitialized() )
		return 0;

	CIpAddress addr;

    // Were we passed a URL?
    if ( !x_uPort && addr.LookupUri( x_sAddress ) )
		return Connect( addr );

	// Lookup the host address
    if ( addr.LookupHost( x_sAddress, x_uPort ) )
		return Connect( addr );

	return 0;
}
开发者ID:AmberSandDan,项目名称:htmapp,代码行数:21,代码来源:sockets.cpp


示例2: SetupRegion

logical pc_ADK_Field :: SetupRegion ( )
{
  PropertyHandle        *pfc = GetParentProperty();
  PropertyHandle        *my_class  = pfc->GPH("class");
  PropertyHandle        *member;
  logical                coll_opt;
  char                  *type;
  char                  *propnames = NULL;
  logical                term = NO;
BEGINSEQ
  if ( IsInitialized() )                             LEAVESEQ
  
  propnames = strdup(GPH("sys_ident")->GetString());
  if ( !my_class->Get(FIRST_INSTANCE) )              ERROR

  pc_ADK_Class   structure(*my_class);  
  if ( member = structure.GetMember(propnames) )
    coll_opt = pc0_SDB_Member(member).IsMultipleRef() ? YES : NO;
  else
  {
    pc_ADK_Class  all_class(GetObjectHandle(),PI_Read);  
    PropertyHandle phpropnames(propnames);
    if ( all_class.Get(phpropnames) )
    {
      type     = "DRT_Extent";
      coll_opt = YES;
    }
  }

  *GPH("auto_open") = YES;
  SetupDataSource(propnames,type,coll_opt);
  SetupTitle(propnames);

RECOVER
  term = YES;
ENDSEQ
  if ( propnames )
    free(propnames);
  return(term);
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:40,代码来源:pc_ADK_Field.cpp


示例3: GetState

/*
** Runs given function in script file and stores the retruned number or string.
**
*/
int LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, std::wstring& strValue)
{
    auto L = GetState();
    int type = LUA_TNIL;

    if (IsInitialized())
    {
        // Push our table onto the stack
        lua_rawgeti(L, LUA_GLOBALSINDEX, m_Ref);

        // Push the function onto the stack
        lua_getfield(L, -1, funcName);

        if (lua_pcall(L, 0, 1, 0))
        {
            LuaManager::ReportErrors(m_File);
            lua_pop(L, 1);
        }
        else
        {
            type = lua_type(L, -1);
            if (type == LUA_TNUMBER)
            {
                numValue = lua_tonumber(L, -1);
            }
            else if (type == LUA_TSTRING)
            {
                size_t strLen = 0;
                const char* str = lua_tolstring(L, -1, &strLen);
                strValue = m_Unicode ?
                           StringUtil::WidenUTF8(str, (int)strLen) : StringUtil::Widen(str, (int)strLen);
                numValue = strtod(str, nullptr);
            }

            lua_pop(L, 2);
        }
    }

    return type;
}
开发者ID:jithuin,项目名称:infogeezer,代码行数:44,代码来源:LuaScript.cpp


示例4: RegisterComponentCreator

// ---------------------------------------------------------------------------
// VComponentManager::RegisterComponentCreator						[static]
// ---------------------------------------------------------------------------
// Install a component creator function. If a library based creator exists,
// the new one will overwrite it.
//
VError VComponentManager::RegisterComponentCreator(CType inType, CreateComponentProcPtr inProcPtr, Boolean inOverwritePrevious)
{
	if (!IsInitialized()) return VE_COMP_UNITIALISED;
	
	VError	error = VE_OK;
	
	sAccessingTypes->Lock();
	sAccessingChecked->Lock();
	
	// Make sure the proc isn't allready installed
	sLONG	index = sComponentTypes->FindPos(inType);
	if (index > 0 && !inOverwritePrevious && sComponentProcs->GetNth(index) == inProcPtr)
	{
		error = VE_COMP_ALLREADY_REGISTRED;
	}
	
	if (error == VE_OK)
	{
		if (index > 0)
		{
			// Replace old one
			sComponentProcs->SetNth(inProcPtr, index);
		}
		else
		{
			// Add new one at end of list
			sComponentProcs->AddTail(inProcPtr);
			sComponentTypes->AddTail(inType);
			sComponentLibraries->AddTail(NULL);
		
			// Reset checking for unavailable components
			ResetComponentRequirements(inType, false);
		}
	}
	
	sAccessingChecked->Unlock();
	sAccessingTypes->Unlock();
		
	return error;
}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:46,代码来源:VComponentManager.cpp


示例5: NS_ABORT_IF_FALSE

nsresult
Omnijar::GetURIString(Type aType, nsACString& aResult)
{
  NS_ABORT_IF_FALSE(IsInitialized(), "Omnijar not initialized");

  aResult.Truncate();

  // Return an empty string for APP in the unified case.
  if ((aType == APP) && sIsUnified) {
    return NS_OK;
  }

  nsAutoCString omniJarSpec;
  if (sPath[aType]) {
    nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec);
    if (NS_WARN_IF(NS_FAILED(rv))) {
      return rv;
    }

    aResult = "jar:";
    if (sIsNested[aType]) {
      aResult += "jar:";
    }
    aResult += omniJarSpec;
    aResult += "!";
    if (sIsNested[aType]) {
      aResult += "/" NS_STRINGIFY(OMNIJAR_NAME) "!";
    }
  } else {
    nsCOMPtr<nsIFile> dir;
    nsDirectoryService::gService->Get(SPROP(aType), NS_GET_IID(nsIFile),
                                      getter_AddRefs(dir));
    nsresult rv = NS_GetURLSpecFromActualFile(dir, aResult);
    if (NS_WARN_IF(NS_FAILED(rv))) {
      return rv;
    }
  }
  aResult += "/";
  return NS_OK;
}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:40,代码来源:Omnijar.cpp


示例6: Serialize

	//! serializes the entity to/from a PropertyStream
	void ParticleGenerator::Serialize(PropertyStream& stream)
	{
		super::Serialize(stream);
		
		bool bMaxParticlesChanged = stream.Serialize(PT_UInt, "MaxParticles", &m_MaxParticles);
		stream.Serialize(PT_Int, "ParticlesPerSecond", &m_ParticlesPerSecond);
		stream.Serialize(PT_Range, "ParticleLife", &m_rParticleLife);
		stream.Serialize(PT_Range, "ParticleSpeed", &m_rParticleInitialSpeed);
		bool bParticleSizeChanged = stream.Serialize(PT_Float, "ParticleSize", &m_fParticleSize);
		stream.Serialize(PT_Vec3, "Direction", &m_vDirection);
		stream.Serialize(PT_Vec3, "Gravity", &m_vGravity);
		stream.Serialize(PT_AABBox3D, "EmitBox", &m_EmitBox);
		stream.Serialize(PT_AABBox3D, "BoundingBox", &m_BoundingBox);
		stream.Serialize(PT_UInt, "PoolSize", &m_PoolSize);
		if(stream.Serialize(PT_Float, "ActiveTime", &m_fActiveTime))
		{
			m_bActive = true;
		}
		stream.Serialize(PT_Bool, "Explosive", &m_bExplosive);
		bool bApplyWorldTransformChanged = stream.Serialize(PT_Bool, "ApplyWorldTransform", &m_bApplyWorldTransform);		
		
		if(IsInitialized())
		{
			VertexBuffer* pVertexBuffer = GetComponent<GraphicComponent>()->GetVertexBuffer();
			bool bPointSprite = GraphicExtensionHandler::Instance()->HasExtension(GraphicExtensionHandler::E_PointSprite);
			if(bMaxParticlesChanged)
			{
				u32 numVertices = bPointSprite ? m_MaxParticles : m_MaxParticles*6;
				pVertexBuffer->SetVertices(snew Vertex3D[numVertices], numVertices);
			}
			if(bParticleSizeChanged && bPointSprite)
			{
				static_cast<PointSpriteStateSetter*>(pVertexBuffer->GetRenderStateSetter())->SetPointSize(m_fParticleSize);
			}
			if(bApplyWorldTransformChanged)
			{
				pVertexBuffer->SetApplyWorldTransforms(m_bApplyWorldTransform);
			}
		}
	}	
开发者ID:aminere,项目名称:VLADHeavyStrikePublic,代码行数:41,代码来源:ParticleGenerator.cpp


示例7: AfxMessageBox

TextVisitor::TextVisitor(LPCTSTR fileName)
{
	m_topLevel = 0;
	m_lastNoteNr = 0;
	m_initOk = TRUE;
	m_buffer = NULL;
	m_connents = "";
	if(!m_outFile.Open(fileName, CFile::modeCreate | CFile::modeWrite)){
		m_initOk = FALSE;
		AfxMessageBox(IDS_OPEN_ERR);
	}
	if(IsInitialized()){
		for(int i = 0; i < 40; i++){
			m_separator += _T("-");
		}
		m_separator += NL;
		CString title;
		AfxGetApp()->m_pMainWnd->GetWindowText(title);
		WriteTextLn(title + _T(" generated on ") + XMLDoc::GetTimeString());
		WriteTextLn(CString(_T("")));
	}
}
开发者ID:madebits,项目名称:cpp-mfc-vnotes,代码行数:22,代码来源:TextVisitor.cpp


示例8: TermLevel

// ----------------------------------------------------------------------- //
//
//	ROUTINE:	CMusic::TermMusicLevel
//
//	PURPOSE:	Terminate Music for Current Game Level
//
// ----------------------------------------------------------------------- //
void CMusic::TermLevel()
{
	// make sure mgrs are initialized
	if (!IsInitialized()) return;
	if (m_pMusicMgr == NULL) return;

	// make sure directmusic mgr was available
	if (m_pMusicMgr != NULL)
	{
		// initialize the music mgr
		m_pMusicMgr->TermLevel();
	}

	{ // BL 09/26/00
		// clear the state

		m_State.Clear();
	}

	// set level initialized flag
	m_bLevelInitialized = FALSE;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:29,代码来源:Music.cpp


示例9: RemoveAudioChannelLayout

//_____________________________________________________________________________
//
OSStatus 	AUPannerBase::SetAudioChannelLayout(		AudioUnitScope 				inScope, 
														AudioUnitElement 			inElement,
														const AudioChannelLayout *	inLayout)
{
	if (!inLayout)
		return RemoveAudioChannelLayout(inScope, inElement);

	if (!ChannelLayoutTagIsSupported(inScope, inElement, inLayout->mChannelLayoutTag))
		return kAudioUnitErr_FormatNotSupported;
	
	CAAudioChannelLayout* caacl = NULL;
	UInt32 currentChannels;
	switch (inScope) 
	{
		case kAudioUnitScope_Input:
			caacl = &mInputLayout;
			currentChannels = GetNumberOfInputChannels();
			break;
		case kAudioUnitScope_Output:
			caacl = &mOutputLayout;
			currentChannels = GetNumberOfOutputChannels();
			break;
		default:
			return kAudioUnitErr_InvalidScope;
	}
	
	if (inElement != 0)
		return kAudioUnitErr_InvalidElement;

	UInt32 numChannelsInLayout = CAAudioChannelLayout::NumberChannels(*inLayout);
	if (currentChannels != numChannelsInLayout)
		return kAudioUnitErr_InvalidPropertyValue;
	
	*caacl = inLayout;
	if (IsInitialized())
		UpdateBypassMatrix();
		
	return noErr;
}
开发者ID:0xJoker,项目名称:apple-ios-samples,代码行数:41,代码来源:AUPannerBase.cpp


示例10: Listen

int CIpSocket::Listen( unsigned int x_uMaxConnections )
{
	// Punt if not initialized
	if ( !IsInitialized() )
		return 0;

	// Must have socket
	if ( !IsSocket() )
	{	m_uConnectState |= eCsError;
		return 0;
	} // end if

	// Valid number of connections?
	if ( x_uMaxConnections == 0 )
		x_uMaxConnections = 16;
//		x_uMaxConnections = SOMAXCONN;

	// Start the socket listening
	int nRet = listen( (SOCKET)m_hSocket, (int)( x_uMaxConnections ? x_uMaxConnections : SOMAXCONN ) );

	// Save the last error code
	m_uLastError = WSAGetLastError();
	if ( WSAEWOULDBLOCK == m_uLastError )
		m_uLastError = 0, nRet = 0;

	// Error?
	if ( c_SocketError == (t_SOCKET)nRet )
	{	m_uConnectState |= eCsError;
		return 0;
	} // end if

	// We're trying to connect
	m_lActivity++;
	m_uConnectState |= eCsConnecting;

	// Return the result
	return 1;
}
开发者ID:summit4you,项目名称:QThybrid,代码行数:38,代码来源:sockets-windows.hpp


示例11: UnRegisterComponentCreator

// ---------------------------------------------------------------------------
// VComponentManager::UnRegisterComponentCreator					[static]
// ---------------------------------------------------------------------------
// Remove a component creator function. If a library based creator exists,
// it will become the defaut one.
//
VError VComponentManager::UnRegisterComponentCreator(CType inType, CreateComponentProcPtr inProcPtr)
{
	if (!IsInitialized()) return VE_COMP_UNITIALISED;
	
	VError	error = VE_COMP_LIBRARY_NOT_FOUND;
	
	sAccessingTypes->Lock();
	sAccessingChecked->Lock();
	
	// Make sure the proc is installed
	sLONG	index = sComponentTypes->FindPos(inType);
	if (index > 0 && sComponentProcs->GetNth(index) == inProcPtr)
	{
		VLibrary*	library = sComponentLibraries->GetNth(index);
		
		if (library == NULL)
		{
			sComponentLibraries->DeleteNth(index);
			sComponentProcs->DeleteNth(index);
			sComponentTypes->DeleteNth(index);
		
			// Reset checking for available components
			ResetComponentRequirements(inType, true);
		}
		else
		{
			library->Release();
			sComponentProcs->SetNth(NULL, index);
		}
		
		error = VE_OK;
	}
	
	sAccessingChecked->Unlock();
	sAccessingTypes->Unlock();
	
	return error;
}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:44,代码来源:VComponentManager.cpp


示例12: Init

// ----------------------------------------------------------------------- //
//
//	ROUTINE:	CMusic::Init
//
//	PURPOSE:	Initialize the music
//
// ----------------------------------------------------------------------- //
LTBOOL CMusic::Init( ILTClient *pClientDE)
{
	// make sure we are not already initialized
    if (IsInitialized()) return LTTRUE;

	m_pClientDE = pClientDE;

	m_bMusicEnabled = TRUE;
	m_bLevelInitialized = FALSE;
	m_pMusicMgr = NULL;

	// get the musicenable console var
    HCONSOLEVAR hVar = g_pLTClient->GetConsoleVar("disablemusic");
	if (hVar)
	{
		// check if music is disabled
        if (((int)g_pLTClient->GetVarValueFloat(hVar)) != 0)
		{
			m_bMusicEnabled = FALSE;
		}
	}

	// if music is enabled
	if (MusicEnabled())
	{
		// get a pointer to the music mgr
        m_pMusicMgr = g_pLTClient->GetDirectMusicMgr();

		// make sure directmusic mgr was available
		if (m_pMusicMgr != NULL)
		{
			// initialize the music mgr
			m_pMusicMgr->Init();
		}
	}

    return LTTRUE;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:45,代码来源:Music.cpp


示例13: switch

void SerialPortC::SetSpeed(PortSpeedE NewSpeed)
	{
	Speed = NewSpeed;

	int rs_Baud;

	switch (NewSpeed)
		{
		default: assert(FALSE);

		case PS_300:	{ rs_Baud = 2; break; }
		case PS_600:	{ rs_Baud = 3; break; }
		case PS_1200:	{ rs_Baud = 4; break; }
		case PS_2400:	{ rs_Baud = 5; break; }
		case PS_4800:	{ rs_Baud = 6; break; }
		case PS_9600:	{ rs_Baud = 7; break; }
		case PS_19200:	{ rs_Baud = 8; break; }
		case PS_38400:	{ rs_Baud = 9; break; }
		case PS_57600:	{ rs_Baud = 10; break; }
		case PS_115200: { rs_Baud = 11; break; }
		}

	// disable interrupts for baud change
	if (IsInitialized())
		{
		Deinit();
		}

	assert(initrs);
	(*initrs)((cfg.mdata - 1), rs_Baud, 0, 0, 3, cfg.checkCTS);

	SetInitialized();

	if (cfg.baudPause)
		{
		pause(cfg.baudPause);
		}
	}
开发者ID:dylancarlson,项目名称:citplus,代码行数:38,代码来源:port.cpp


示例14: Flush

OMX_ERRORTYPE COMXCoreTunel::Flush()
{
  if(!m_DllOMXOpen || !m_src_component || !m_dst_component || !m_tunnel_set || !IsInitialized())
    return OMX_ErrorUndefined;

  Lock();

  OMX_ERRORTYPE omx_err = OMX_ErrorNone;
  if(m_src_component->GetComponent())
  {
    omx_err = m_src_component->SendCommand(OMX_CommandFlush, m_src_port, NULL);
    if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)
    {
      CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush  port %d on component %s omx_err(0x%08x)", 
          m_src_port, m_src_component->GetName().c_str(), (int)omx_err);
    }
  }

  if(m_dst_component->GetComponent())
  {
    omx_err = m_dst_component->SendCommand(OMX_CommandFlush, m_dst_port, NULL);
    if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)
    {
      CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush port %d on component %s omx_err(0x%08x)", 
          m_dst_port, m_dst_component->GetName().c_str(), (int)omx_err);
    }
  }

  if(m_src_component->GetComponent())
    omx_err = m_src_component->WaitForCommand(OMX_CommandFlush, m_src_port);

  if(m_dst_component->GetComponent())
    omx_err = m_dst_component->WaitForCommand(OMX_CommandFlush, m_dst_port);

  UnLock();

  return OMX_ErrorNone;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:plex-home-theatre,代码行数:38,代码来源:OMXCore.cpp


示例15: event_level

Eluna::Eluna() :
event_level(0),
push_counter(0),
enabled(false),

L(NULL),
eventMgr(NULL),

ServerEventBindings(NULL),
PlayerEventBindings(NULL),
GuildEventBindings(NULL),
GroupEventBindings(NULL),
VehicleEventBindings(NULL),
BGEventBindings(NULL),

PacketEventBindings(NULL),
CreatureEventBindings(NULL),
CreatureGossipBindings(NULL),
GameObjectEventBindings(NULL),
GameObjectGossipBindings(NULL),
ItemEventBindings(NULL),
ItemGossipBindings(NULL),
PlayerGossipBindings(NULL),
MapEventBindings(NULL),
InstanceEventBindings(NULL),

CreatureUniqueBindings(NULL)
{
    ASSERT(IsInitialized());

    OpenLua();

    // Replace this with map insert if making multithread version

    // Set event manager. Must be after setting sEluna
    // on multithread have a map of state pointers and here insert this pointer to the map and then save a pointer of that pointer to the EventMgr
    eventMgr = new EventMgr(&Eluna::GEluna);
}
开发者ID:AlexShiLucky,项目名称:Eluna,代码行数:38,代码来源:LuaEngine.cpp


示例16: ChannelData

int LMEConnection::ChannelData(UINT32 recipientChannel,
			       UINT32 len, unsigned char *buffer)
{
	if (!IsInitialized()) {
		PRINT("State: not connected to HECI.\n");
		return false;
	}

	APF_CHANNEL_DATA_MESSAGE *message;

	if (len > _heci.GetBufferSize() - sizeof(APF_CHANNEL_DATA_MESSAGE)) {
		return -1;
	}

	message = (APF_CHANNEL_DATA_MESSAGE *)_txBuffer;
	message->MessageType = APF_CHANNEL_DATA;
	message->RecipientChannel = htonl(recipientChannel);
	message->DataLength = htonl(len);
	memcpy(message->Data, buffer, len);

	PRINT("Sending %d bytes to recipient channel %d.\n", len, recipientChannel);
	return _sendMessage((unsigned char *)message, sizeof(APF_CHANNEL_DATA_MESSAGE) + len);
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:23,代码来源:LMEConnection.cpp


示例17: OP_ASSERT

OP_STATUS OpHashTable::Remove(const void* key, void** data)
{
	OP_ASSERT(data != NULL);
	*data = NULL;

	if (!IsInitialized())
	{
		return OpStatus::ERR;
	}

	if (nr_of_elements <= minimumNrOfElements[hash_size_index] && hash_size_index > 0 && minimumNrOfElements[hash_size_index - 1] >= minimum_nr_of_elements)
	{
		OP_STATUS ret_val = Rehash(hash_size_index - 1);
		if (OpStatus::IsSuccess(ret_val))
		{
				hash_size_index--;
		}
	}

	RETURN_IF_ERROR(hash_backend.Remove(key, data)); // Never returns ERR_NO_MEMORY.
	nr_of_elements--;
	return OpStatus::OK;
}
开发者ID:prestocore,项目名称:browser,代码行数:23,代码来源:OpHashTable.cpp


示例18: RetainComponent

CComponent* VComponentManager::RetainComponent(CRef inRef)
{
	if (!IsInitialized()) return NULL;
	
	CComponent*	component = NULL;
	VArrayIteratorOf<CComponent*>	iterator(*sComponentInstances);
	
	sAccessingInstances->Lock();
	
	// Iterate through instances
	while ((component = iterator.Next()) != NULL)
	{
		if (component->GetComponentRef() == inRef)
		{
			component->Retain();
			break;
		}
	}
	
	sAccessingInstances->Unlock();
	
	return component;
}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:23,代码来源:VComponentManager.cpp


示例19: Initialize

// -------------------------------------
// Initialization functions
//
QTTrack::ErrorCode QTTrack::Initialize(void)
{
    // Temporary vars
    QTFile::AtomTOCEntry    *tempTOCEntry;


    //
    // Don't initialize more than once.
    if( IsInitialized() )
        return errNoError;

    //
    // Make sure that we were able to read in our track header atom.
    if( fTrackHeaderAtom == NULL )
        return errInvalidQuickTimeFile;

    //
    // See if this track has a name and load it in.
    if( fFile->FindTOCEntry(":udta:name", &tempTOCEntry, &fTOCEntry) ) {
        fTrackName = NEW char[ (SInt32) (tempTOCEntry->AtomDataLength + 1) ];
        if( fTrackName != NULL )
            fFile->Read(tempTOCEntry->AtomDataPos, fTrackName, (UInt32) tempTOCEntry->AtomDataLength);
    }
开发者ID:248668342,项目名称:ffmpeg-windows,代码行数:26,代码来源:QTTrack.cpp


示例20: switch

/*! @method SetProperty */
OSStatus			AUPannerBase::SetProperty(AudioUnitPropertyID 		inID,
										AudioUnitScope 				inScope,
										AudioUnitElement 			inElement,
										const void *				inData,
										UInt32 						inDataSize)
{
	switch (inID) 
	{
		case kAudioUnitProperty_BypassEffect:
				if (inDataSize < sizeof(UInt32))
					return kAudioUnitErr_InvalidPropertyValue;
				bool tempNewSetting = *((UInt32*)inData) != 0;
					// we're changing the state of bypass
				if (tempNewSetting != IsBypassEffect()) 
				{
					if (!tempNewSetting && IsBypassEffect() && IsInitialized()) // turning bypass off and we're initialized
						Reset(0, 0);
					SetBypassEffect (tempNewSetting);
				}
				return noErr;
	}
    return AUBase::SetProperty(inID, inScope, inElement, inData, inDataSize);
}
开发者ID:0xJoker,项目名称:apple-ios-samples,代码行数:24,代码来源:AUPannerBase.cpp



注:本文中的IsInitialized函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsInside函数代码示例发布时间:2022-05-30
下一篇:
C++ IsInWorld函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap