本文整理汇总了C++中sharedList函数的典型用法代码示例。如果您正苦于以下问题:C++ sharedList函数的具体用法?C++ sharedList怎么用?C++ sharedList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sharedList函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: locker
void QBSoundWin::stopAll()
{
//printf("stopAll\n");
QBSoundLocker locker(&mMutex);
#ifdef __USE_OGG_VORBIS__
{
PlayerList::iterator it = streamTrack.begin();
while(it != streamTrack.end()) {
delete (*it).second;
++it;
}
streamTrack.clear();
}
{
EffectList::iterator it = sharedList().begin();
while(it != sharedList().end())
{
delete (*it).second;
++it;
}
sharedList().clear();
}
#endif
return QBSound::stopAll();
}
开发者ID:yamagame,项目名称:PicoPicoGameEngine,代码行数:25,代码来源:QBSoundWin.cpp
示例2: setEffectsVolume
void SimpleAudioEngine::setEffectsVolume(float volume)
{
EffectList::iterator iter;
for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
{
iter->second->SetVolume(int(volume * 100));
}
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:8,代码来源:SimpleAudioEngine.cpp
示例3: sharedList
void SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
{
EffectList::iterator p = sharedList().find(nSoundId);
if (p != sharedList().end())
{
p->second->Resume();
}
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:8,代码来源:SimpleAudioEngine.cpp
示例4: stopAllEffects
void SimpleAudioEngine::stopAllEffects()
{
EffectList::iterator iter;
for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
{
iter->second->Stop();
}
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:8,代码来源:SimpleAudioEngine.cpp
示例5: sharedList
float SimpleAudioEngine::getEffectsVolume()
{
EffectList::iterator iter;
iter = sharedList().begin();
if (iter != sharedList().end())
{
return float(iter->second->GetVolume()) / 100.f;
}
}
开发者ID:0309,项目名称:cocos2d-x,代码行数:9,代码来源:SimpleAudioEngine.cpp
示例6: _Hash
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
unsigned int nID = _Hash(pszFilePath);
EffectList::iterator p = sharedList().find(nID);
if (p != sharedList().end())
{
delete p->second;
p->second = nullptr;
sharedList().erase(nID);
}
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:12,代码来源:SimpleAudioEngine.cpp
示例7: sharedMusic
void SimpleAudioEngine::end()
{
sharedMusic().Close();
for (auto& iter : sharedList())
{
delete iter.second;
iter.second = nullptr;
}
sharedList().clear();
return;
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:12,代码来源:SimpleAudioEngine.cpp
示例8: sharedMusic
void SimpleAudioEngine::end()
{
sharedMusic().Close();
EffectList::iterator p = sharedList().begin();
while (p != sharedList().end())
{
delete p->second;
p->second = NULL;
p++;
}
sharedList().clear();
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:13,代码来源:SimpleAudioEngine.cpp
示例9: _Hash
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop)
{
unsigned int nRet = _Hash(pszFilePath);
preloadEffect(pszFilePath);
EffectList::iterator p = sharedList().find(nRet);
if (p != sharedList().end())
{
p->second->Play((bLoop) ? -1 : 1);
}
return nRet;
}
开发者ID:wenhulove333,项目名称:ScutServer,代码行数:14,代码来源:SimpleAudioEngine.cpp
示例10: _Hash
bool SimpleAudioEngine::isEffectPlaying(const char* pszFilePath)
{
unsigned int nRet = _Hash(pszFilePath);
bool result = false;
EffectList::iterator p = sharedList().find(nRet);
if (p != sharedList().end())
{
return p->second->IsPlaying();
}
return result;
}
开发者ID:XoDeR,项目名称:RioEngine,代码行数:14,代码来源:SimpleAudioEngine.cpp
示例11: _Hash
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop/* = false*/,
float pitch/* = 1.0f*/, float pan/* = 0.0f*/, float gain/* = 1.0f*/)
{
unsigned int nRet = _Hash(pszFilePath);
preloadEffect(pszFilePath);
EffectList::iterator p = sharedList().find(nRet);
if (p != sharedList().end())
{
p->second->Play(bLoop);
}
return nRet;
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:15,代码来源:SimpleAudioEngine.cpp
示例12: resumeAllEffects
void SimpleAudioEngine::resumeAllEffects()
{
for (auto& iter : sharedList())
{
iter.second->Resume();
}
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp
示例13: pauseAllEffects
void SimpleAudioEngine::pauseAllEffects()
{
for (auto& iter : sharedList())
{
iter.second->Pause();
}
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp
示例14: stopAllEffects
void SimpleAudioEngine::stopAllEffects()
{
for (auto& iter : sharedList())
{
iter.second->Stop();
}
}
开发者ID:bonlai,项目名称:3kaigame,代码行数:7,代码来源:SimpleAudioEngine.cpp
示例15: BREAK_IF
void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
{
int nRet = 0;
do
{
BREAK_IF(! pszFilePath);
nRet = _Hash(pszFilePath);
BREAK_IF(sharedList().end() != sharedList().find(nRet));
sharedList().insert(Effect(nRet, new MciPlayer()));
MciPlayer * pPlayer = sharedList()[nRet];
pPlayer->Open(_FullPath(pszFilePath), nRet);
BREAK_IF(nRet == pPlayer->GetSoundID());
sharedList().erase(nRet);
nRet = 0;
} while (0);
}
开发者ID:XoDeR,项目名称:RioEngine,代码行数:21,代码来源:SimpleAudioEngine.cpp
示例16: _Hash
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
unsigned int nID = _Hash(pszFilePath);
sharedList().erase(nID);
}
开发者ID:bartholomule,项目名称:redneckracer,代码行数:5,代码来源:SimpleAudioEngine.cpp
示例17: nameMatches
void OXMLi_ListenerState_Numbering::endElement (OXMLi_EndElementRequest * rqst)
{
if (
nameMatches(rqst->pName, NS_W_KEY, "numbering") ||
nameMatches(rqst->pName, NS_W_KEY, "abstractNum") ||
nameMatches(rqst->pName, NS_W_KEY, "multiLevelType") ||
nameMatches(rqst->pName, NS_W_KEY, "name") ||
nameMatches(rqst->pName, NS_W_KEY, "nsid") ||
nameMatches(rqst->pName, NS_W_KEY, "numStyleLink") ||
nameMatches(rqst->pName, NS_W_KEY, "styleLink") ||
nameMatches(rqst->pName, NS_W_KEY, "tmpl") ||
nameMatches(rqst->pName, NS_W_KEY, "isLgl") ||
nameMatches(rqst->pName, NS_W_KEY, "legacy") ||
nameMatches(rqst->pName, NS_W_KEY, "lvlJc") ||
nameMatches(rqst->pName, NS_W_KEY, "lvlPicBulletId") ||
nameMatches(rqst->pName, NS_W_KEY, "lvlRestart") ||
nameMatches(rqst->pName, NS_W_KEY, "lvlText") ||
nameMatches(rqst->pName, NS_W_KEY, "numFmt") ||
nameMatches(rqst->pName, NS_W_KEY, "start") ||
nameMatches(rqst->pName, NS_W_KEY, "suff") ||
nameMatches(rqst->pName, NS_W_KEY, "abstractNumId")
)
{
//TODO: add functionality here
rqst->handled = true;
}
else if(nameMatches(rqst->pName, NS_W_KEY, "lvl"))
{
OXML_Document * doc = OXML_Document::getInstance();
if(!doc)
{
doc = OXML_Document::getNewInstance();
}
OXML_SharedList sharedList(m_currentList);
doc->addList(sharedList);
m_currentList = NULL;
rqst->handled = true;
}
else if(nameMatches(rqst->pName, NS_W_KEY, "num"))
{
m_currentNumId.clear(); //set it to empty string
rqst->handled = true;
}
else if(nameMatches(rqst->pName, NS_W_KEY, "pPr") ||
nameMatches(rqst->pName, NS_W_KEY, "rPr"))
{
if(rqst->stck->empty())
{
rqst->handled = false;
rqst->valid = false;
return;
}
OXML_SharedElement dummy = rqst->stck->top();
if(m_currentList)
{
m_currentList->setAttributes(dummy->getAttributes());
m_currentList->setProperties(dummy->getProperties());
}
rqst->stck->pop(); //remove the dummy element
rqst->handled = true;
}
}
开发者ID:hfiguiere,项目名称:abiword,代码行数:63,代码来源:OXMLi_ListenerState_Numbering.cpp
示例18: sharedMusic
void SimpleAudioEngine::end()
{
sharedMusic().Close();
sharedList().clear();
return;
}
开发者ID:bartholomule,项目名称:redneckracer,代码行数:6,代码来源:SimpleAudioEngine.cpp
注:本文中的sharedList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论