| 485 | } |
| 486 | |
| 487 | std::pair<MidiTime, MidiTime> Song::getExportEndpoints() const |
| 488 | { |
| 489 | if ( m_renderBetweenMarkers ) |
| 490 | { |
| 491 | return std::pair<MidiTime, MidiTime>( |
| 492 | m_playPos[Mode_PlaySong].m_timeLine->loopBegin(), |
| 493 | m_playPos[Mode_PlaySong].m_timeLine->loopEnd() |
| 494 | ); |
| 495 | } |
| 496 | else if ( m_exportLoop ) |
| 497 | { |
| 498 | return std::pair<MidiTime, MidiTime>( MidiTime(0, 0), MidiTime(m_length, 0) ); |
| 499 | } |
| 500 | else |
| 501 | { |
| 502 | // if not exporting as a loop, we leave one bar of padding at the end of the song to accomodate reverb, etc. |
| 503 | return std::pair<MidiTime, MidiTime>( MidiTime(0, 0), MidiTime(m_length+1, 0) ); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | |
| 508 | |