Changeset 625
- Timestamp:
- 11/05/08 09:51:11 (2 months ago)
- Files:
-
- branches/new_fx_rack_and_sample_fun/Sconstruct (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/gui/src/ExportSongDialog.cpp (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/gui/src/MainForm.cpp (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/gui/src/PatternEditor/NotePropertiesRuler.cpp (modified) (4 diffs)
- branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp (modified) (2 diffs)
- branches/new_fx_rack_and_sample_fun/libs/hydrogen/include/hydrogen/sample.h (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/local_file_mgr.cpp (modified) (2 diffs)
- branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/sample.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/new_fx_rack_and_sample_fun/Sconstruct
r505 r625 66 66 67 67 68 i ncludes.append( '/usr/lib/lash-1.0' )68 if lash: includes.append( '/usr/lib/lash-1.0' ) 69 69 70 70 if libarchive: cppflags.append('-DLIBARCHIVE_SUPPORT') branches/new_fx_rack_and_sample_fun/gui/src/ExportSongDialog.cpp
r171 r625 136 136 m_pProgressBar->setValue( nValue ); 137 137 if ( nValue == 100 ) { 138 //INFOLOG("SONO A 100"); 139 Hydrogen::get_instance()->stopExportSong(); 140 m_bExporting = false; 138 //INFOLOG("SONO A 100"); 139 140 Hydrogen::get_instance()->stopExportSong(); 141 m_bExporting = false; 142 QFile check( exportNameTxt->text() ); 143 if ( ! check.exists() ) { 144 QMessageBox::information( this, "Hydrogen", trUtf8("Export failed!") ); 145 } 146 } 141 147 accept(); 142 }143 148 } branches/new_fx_rack_and_sample_fun/gui/src/MainForm.cpp
r597 r625 624 624 { 625 625 _ERRORLOG ( "Error saving the pattern" ); 626 QMessageBox::warning( this, "Hydrogen", trUtf8("Could not export pattern.") ); 626 627 } 627 628 } branches/new_fx_rack_and_sample_fun/gui/src/PatternEditor/NotePropertiesRuler.cpp
r601 r625 598 598 if ( !pPatternEditor->isUsingTriplets() ) { 599 599 600 for (uint i = 0; i < MAX_NOTES + 1; i++) {600 for (uint i = 0; i < nNotes +1 ; i++) { 601 601 uint x = 20 + i * m_nGridWidth; 602 602 … … 637 637 int nSize = 4 * MAX_NOTES / (nBase * nResolution); 638 638 639 for (uint i = 0; i < MAX_NOTES +1; i++) {639 for (uint i = 0; i < nNotes +1; i++) { 640 640 uint x = 20 + i * m_nGridWidth; 641 641 … … 753 753 if ( !pPatternEditor->isUsingTriplets() ) { 754 754 755 for (uint i = 0; i < MAX_NOTES+ 1; i++) {755 for (uint i = 0; i < nNotes + 1; i++) { 756 756 uint x = 20 + i * m_nGridWidth; 757 757 … … 792 792 int nSize = 4 * MAX_NOTES / (nBase * nResolution); 793 793 794 for (uint i = 0; i < MAX_NOTES+ 1; i++) {794 for (uint i = 0; i < nNotes + 1; i++) { 795 795 uint x = 20 + i * m_nGridWidth; 796 796 branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp
r623 r625 285 285 m_loop_frame, 286 286 m_end_frame, 287 m_repeats ); 287 m_repeats, 288 m_sample_mode); 288 289 289 290 AudioEngine::get_instance()->lock( "SampeEditor::insert new sample" ); … … 440 441 } 441 442 442 setSamplelengthFrames();443 m_pslframes = pNewSample->get_n_frames(); 443 444 m_pMainSampleWaveDisplay->paintLocatorEvent( StartFrameSpinBox->value() / m_divider + 24 , true); 444 445 m_pSampleAdjustView->setDetailSamplePosition( m_start_frame, m_pzoomfactor , 0); branches/new_fx_rack_and_sample_fun/libs/hydrogen/include/hydrogen/sample.h
r623 r625 83 83 const unsigned loppframe, 84 84 const unsigned endframe, 85 const int loops ); 85 const int loops, 86 const QString loopmode ); 86 87 87 88 branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/local_file_mgr.cpp
r602 r625 249 249 250 250 //test if the file exists 251 QFile testfile( sPatternXmlFilename);251 QFile testfile( sPatternXmlFilename ); 252 252 if ( testfile.exists() && mode == 1) 253 253 return 1; … … 298 298 doc.SaveFile(); 299 299 300 300 QFile anotherTestfile( sPatternXmlFilename ); 301 if ( ! anotherTestfile.exists() ) 302 return 1; 301 303 302 304 return 0; // ok branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/sample.cpp
r623 r625 159 159 const unsigned loppframe, 160 160 const unsigned endframe, 161 const int loops ) 162 { 161 const int loops, 162 const QString loopmode) 163 { 164 _INFOLOG( QString( "mode: " + loopmode) ); 165 _INFOLOG( QString( "loops: " ).arg( loops ) ); 163 166 // file exists? 164 167 if ( QFile( filename ).exists() == false ) { … … 234 237 looptempdata_r[i] = origdata_r[z]; 235 238 } 239 240 241 if ( loopmode == "reverse" ){ 242 reverse(looptempdata_l, looptempdata_l + looplength); 243 reverse(looptempdata_r, looptempdata_r + looplength); 244 } 245 246 if ( loopmode == "reverse" && loops > 0 && startframe == loppframe ){ 247 reverse( tempdata_l, tempdata_l + onesamplelength ); 248 reverse( tempdata_r, tempdata_r + onesamplelength ); 249 } 250 236 251 237 252 for ( int i = 0; i< loops ;i++){ 253 238 254 unsigned tempdataend = onesamplelength + ( looplength * i ); 239 255 copy( looptempdata_l, looptempdata_l+looplength ,tempdata_l+tempdataend ); 240 256 copy( looptempdata_r, looptempdata_r+looplength ,tempdata_r+tempdataend ); 241 242 } 257 if ( loopmode == "pingpong" ){ 258 reverse(looptempdata_l, looptempdata_l + looplength); 259 reverse(looptempdata_r, looptempdata_r + looplength); 260 } 261 262 } 263 264 265 if ( loops == 0 && loopmode == "reverse" ){ 266 reverse( tempdata_l + loppframe, tempdata_l + newlength); 267 reverse( tempdata_r + loppframe, tempdata_r + newlength); 268 } 243 269 244 270
