/[svn]/gigedit/trunk/src/gigedit/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2395 by schoenebeck, Mon Jan 7 23:35:08 2013 UTC revision 2398 by persson, Sun Jan 13 09:14:29 2013 UTC
# Line 834  void MainWindow::__import_queued_samples Line 834  void MainWindow::__import_queued_samples
834          SF_INFO info;          SF_INFO info;
835          info.format = 0;          info.format = 0;
836          SNDFILE* hFile = sf_open((*iter).sample_path.c_str(), SFM_READ, &info);          SNDFILE* hFile = sf_open((*iter).sample_path.c_str(), SFM_READ, &info);
837            sf_command(hFile, SFC_SET_SCALE_FLOAT_INT_READ, 0, SF_TRUE);
838          try {          try {
839              if (!hFile) throw std::string(_("could not open file"));              if (!hFile) throw std::string(_("could not open file"));
840              // determine sample's bit depth              // determine sample's bit depth
# Line 1531  void MainWindow::on_action_add_sample() Line 1532  void MainWindow::on_action_add_sample()
1532                  {                  {
1533                      sample->MIDIUnityNote = instrument.basenote;                      sample->MIDIUnityNote = instrument.basenote;
1534    
 #if HAVE_SF_INSTRUMENT_LOOPS  
1535                      if (instrument.loop_count && instrument.loops[0].mode != SF_LOOP_NONE) {                      if (instrument.loop_count && instrument.loops[0].mode != SF_LOOP_NONE) {
1536                          sample->Loops = 1;                          sample->Loops = 1;
1537    
# Line 1551  void MainWindow::on_action_add_sample() Line 1551  void MainWindow::on_action_add_sample()
1551                          sample->LoopPlayCount = instrument.loops[0].count;                          sample->LoopPlayCount = instrument.loops[0].count;
1552                          sample->LoopSize = sample->LoopEnd - sample->LoopStart + 1;                          sample->LoopSize = sample->LoopEnd - sample->LoopStart + 1;
1553                      }                      }
 #endif  
1554                  }                  }
1555    
1556                  // schedule resizing the sample (which will be done                  // schedule resizing the sample (which will be done

Legend:
Removed from v.2395  
changed lines
  Added in v.2398

  ViewVC Help
Powered by ViewVC