diff --git a/include/Song.h b/include/Song.h index 7873bafd6..ee5f594d9 100644 --- a/include/Song.h +++ b/include/Song.h @@ -172,6 +172,10 @@ public: bool isExportDone() const; + inline void setRenderBetweenMarkers( bool renderBetweenMarkers ) + { + m_renderBetweenMarkers = renderBetweenMarkers; + } inline PlayModes playMode() const { @@ -334,6 +338,7 @@ private: volatile bool m_recording; volatile bool m_exporting; volatile bool m_exportLoop; + volatile bool m_renderBetweenMarkers; volatile bool m_playing; volatile bool m_paused; diff --git a/src/core/Song.cpp b/src/core/Song.cpp index de749065b..91eb4e645 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -84,6 +84,7 @@ Song::Song() : m_recording( false ), m_exporting( false ), m_exportLoop( false ), + m_renderBetweenMarkers( false ), m_playing( false ), m_paused( false ), m_loadingProject( false ), @@ -388,11 +389,15 @@ void Song::processNextBuffer() bool Song::isExportDone() const { - if ( m_exportLoop ) + if ( m_renderBetweenMarkers ) { return m_exporting == true && m_playPos[Mode_PlaySong].getTicks() >= m_playPos[Mode_PlaySong].m_timeLine->loopEnd().getTicks(); - + } + if( m_exportLoop) + { + return m_exporting == true && + m_playPos[Mode_PlaySong].getTicks() >= length() * ticksPerTact(); } else { @@ -634,7 +639,7 @@ void Song::stop() void Song::startExport() { stop(); - if(m_exportLoop) + if(m_renderBetweenMarkers) { m_playPos[Mode_PlaySong].setTicks( m_playPos[Mode_PlaySong].m_timeLine->loopBegin().getTicks() ); } diff --git a/src/gui/ExportProjectDialog.cpp b/src/gui/ExportProjectDialog.cpp index 7241216b6..d38efa994 100644 --- a/src/gui/ExportProjectDialog.cpp +++ b/src/gui/ExportProjectDialog.cpp @@ -260,6 +260,7 @@ ProjectRenderer* ExportProjectDialog::prepRender() static_cast( depthCB->currentIndex() ) ); Engine::getSong()->setExportLoop( exportLoopCB->isChecked() ); + Engine::getSong()->setRenderBetweenMarkers( renderMarkersCB->isChecked() ); ProjectRenderer* renderer = new ProjectRenderer( qs, os, m_ft, m_fileName ); diff --git a/src/gui/dialogs/export_project.ui b/src/gui/dialogs/export_project.ui index e9fcaeb01..6443f8c1f 100644 --- a/src/gui/dialogs/export_project.ui +++ b/src/gui/dialogs/export_project.ui @@ -1,7 +1,8 @@ - + + ExportProjectDialog - - + + 0 0 @@ -9,118 +10,127 @@ 412 - + Export project - + - + - - + + Output - - - -1 + + + 6 - + 9 - - + + File format: - + - - + + Samplerate: - + - + 44100 Hz - + 48000 Hz - + 88200 Hz - + 96000 Hz - + 192000 Hz - - - - -1 + + + + 6 - + + 0 + + + 0 + + + 0 + + 0 - - + + Bitrate: - - + + 2 - + 64 KBit/s - + 128 KBit/s - + 160 KBit/s - + 192 KBit/s - + 256 KBit/s - + 320 KBit/s @@ -130,27 +140,36 @@ - - - + + + + 0 + + + 0 + + + 0 + + 0 - - + + Depth: - + - + 16 Bit Integer - + 32 Bit Float @@ -161,13 +180,13 @@ - + Qt::Vertical - + QSizePolicy::Fixed - + 1 10 @@ -176,21 +195,21 @@ - - + + Please note that not all of the parameters above apply for all file formats. - + true - + Qt::Vertical - + 163 20 @@ -202,71 +221,71 @@ - - + + Quality settings - + - - + + Interpolation: - - + + 1 - + Zero Order Hold - + Sinc Fastest - + Sinc Medium (recommended) - + Sinc Best (very slow!) - - + + Oversampling (use with care!): - + - + 1x (None) - + 2x - + 4x - + 8x @@ -279,12 +298,19 @@ + + + + Export between loop markers + + + - + Qt::Vertical - + 20 40 @@ -298,13 +324,13 @@ - + - + Qt::Horizontal - + 40 20 @@ -313,15 +339,15 @@ - - + + Start - - + + Cancel @@ -329,11 +355,11 @@ - - + + false - + 0 @@ -348,11 +374,11 @@ ExportProjectDialog reject() - + 357 293 - + 202 175