本文整理汇总了C++中Hydrogen::setMasterPeak_L方法的典型用法代码示例。如果您正苦于以下问题:C++ Hydrogen::setMasterPeak_L方法的具体用法?C++ Hydrogen::setMasterPeak_L怎么用?C++ Hydrogen::setMasterPeak_L使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hydrogen
的用法示例。
在下文中一共展示了Hydrogen::setMasterPeak_L方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateMixer
//.........这里部分代码省略.........
}
if( !p_foundExistingRelatedComponent )
p_ids_to_delete->push_back( it->first ) ;
}
for ( std::vector<int>::iterator it = p_ids_to_delete->begin() ; it != p_ids_to_delete->end(); ++it ) {
int p_compoID = *it;
delete m_pComponentMixerLine[p_compoID];
m_pComponentMixerLine.erase( p_compoID );
int newWidth = MIXER_STRIP_WIDTH * ( nInstruments + nCompo );
if ( m_pFaderPanel->width() != newWidth ) {
m_pFaderPanel->resize( newWidth, height() );
}
}
}
if (nMuteClicked == nInstruments - 1) {
// find the not muted button
for (uint i = 0; i < nInstruments; i++) {
Instrument *instr = pInstrList->get(i);
if (instr->is_muted() == false) {
m_pMixerLine[i]->setSoloClicked(true);
break;
}
}
}
else {
for (uint i = 0; i < nInstruments; i++) {
m_pMixerLine[i]->setSoloClicked(false);
}
}
// update MasterPeak
float oldPeak_L = m_pMasterLine->getPeak_L();
float newPeak_L = pEngine->getMasterPeak_L();
pEngine->setMasterPeak_L(0.0);
float oldPeak_R = m_pMasterLine->getPeak_R();
float newPeak_R = pEngine->getMasterPeak_R();
pEngine->setMasterPeak_R(0.0);
if (!bShowPeaks) {
newPeak_L = 0.0;
newPeak_R = 0.0;
}
if (newPeak_L >= oldPeak_L) {
m_pMasterLine->setPeak_L( newPeak_L );
}
else {
m_pMasterLine->setPeak_L( oldPeak_L / fallOff );
}
if (newPeak_R >= oldPeak_R) {
m_pMasterLine->setPeak_R(newPeak_R);
}
else {
m_pMasterLine->setPeak_R( oldPeak_R / fallOff );
}
// set master fader position
float newVolume = pSong->get_volume();
float oldVolume = m_pMasterLine->getVolume();
if (oldVolume != newVolume) {
m_pMasterLine->setVolume(newVolume);
}
m_pMasterLine->updateMixerLine();
#ifdef H2CORE_HAVE_LADSPA
// LADSPA
for (uint nFX = 0; nFX < MAX_FX; nFX++) {
LadspaFX *pFX = Effects::get_instance()->getLadspaFX( nFX );
if ( pFX ) {
m_pLadspaFXLine[nFX]->setName( pFX->getPluginName() );
float fNewPeak_L = 0.0;
float fNewPeak_R = 0.0;
float fOldPeak_L = 0.0;
float fOldPeak_R = 0.0;
m_pLadspaFXLine[nFX]->getPeaks( &fOldPeak_L, &fOldPeak_R );
if (fNewPeak_L < fOldPeak_L) fNewPeak_L = fOldPeak_L / fallOff;
if (fNewPeak_R < fOldPeak_R) fNewPeak_R = fOldPeak_R / fallOff;
m_pLadspaFXLine[nFX]->setPeaks( fNewPeak_L, fNewPeak_R );
m_pLadspaFXLine[nFX]->setFxActive( pFX->isEnabled() );
m_pLadspaFXLine[nFX]->setVolume( pFX->getVolume() );
}
else {
m_pLadspaFXLine[nFX]->setName( "No plugin" );
m_pLadspaFXLine[nFX]->setFxActive( false );
m_pLadspaFXLine[nFX]->setVolume( 0.0 );
}
}
// ~LADSPA
#endif
}