本文整理汇总了C++中Hydrogen::getIsExportSessionActive方法的典型用法代码示例。如果您正苦于以下问题:C++ Hydrogen::getIsExportSessionActive方法的具体用法?C++ Hydrogen::getIsExportSessionActive怎么用?C++ Hydrogen::getIsExportSessionActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hydrogen
的用法示例。
在下文中一共展示了Hydrogen::getIsExportSessionActive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: __render_note
//.........这里部分代码省略.........
nReturnValues[nReturnValueIndex] = true;
continue;
}
int noteStartInFrames = ( int ) ( pNote->get_position() * audio_output->m_transport.m_nTickSize ) + pNote->get_humanize_delay();
int nInitialSilence = 0;
if ( noteStartInFrames > ( int ) nFramepos ) { // scrivo silenzio prima dell'inizio della nota
nInitialSilence = noteStartInFrames - nFramepos;
int nFrames = nBufferSize - nInitialSilence;
if ( nFrames < 0 ) {
int noteStartInFramesNoHumanize = ( int )pNote->get_position() * audio_output->m_transport.m_nTickSize;
if ( noteStartInFramesNoHumanize > ( int )( nFramepos + nBufferSize ) ) {
// this note is not valid. it's in the future...let's skip it....
ERRORLOG( QString( "Note pos in the future?? Current frames: %1, note frame pos: %2" ).arg( nFramepos ).arg(noteStartInFramesNoHumanize ) );
//pNote->dumpInfo();
nReturnValues[nReturnValueIndex] = true;
continue;
}
// delay note execution
//INFOLOG( "Delaying note execution. noteStartInFrames: " + to_string( noteStartInFrames ) + ", nFramePos: " + to_string( nFramepos ) );
//return 0;
continue;
}
}
float cost_L = 1.0f;
float cost_R = 1.0f;
float cost_track_L = 1.0f;
float cost_track_R = 1.0f;
assert(pMainCompo);
bool isMutedForExport = (pEngine->getIsExportSessionActive() && !pInstr->is_currently_exported());
/*
* Is instrument muted?
*
* This can be the case either if the song, instrument or component is muted or if we're in an
* export session and we're doing per-instruments exports, but this instrument is not currently
* beeing exported.
*/
if ( isMutedForExport || pInstr->is_muted() || pSong->__is_muted || pMainCompo->is_muted() ) {
cost_L = 0.0;
cost_R = 0.0;
if ( Preferences::get_instance()->m_nJackTrackOutputMode == 0 ) {
// Post-Fader
cost_track_L = 0.0;
cost_track_R = 0.0;
}
} else { // Precompute some values...
if ( pInstr->get_apply_velocity() ) {
cost_L = cost_L * pNote->get_velocity(); // note velocity
cost_R = cost_R * pNote->get_velocity(); // note velocity
}
cost_L = cost_L * pNote->get_pan_l(); // note pan
cost_L = cost_L * fLayerGain; // layer gain
cost_L = cost_L * pInstr->get_pan_l(); // instrument pan
cost_L = cost_L * pInstr->get_gain(); // instrument gain
cost_L = cost_L * pCompo->get_gain(); // Component gain
cost_L = cost_L * pMainCompo->get_volume(); // Component volument
cost_L = cost_L * pInstr->get_volume(); // instrument volume
if ( Preferences::get_instance()->m_nJackTrackOutputMode == 0 ) {