/[svn]/qsampler/trunk/src/qsamplerMainForm.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMainForm.ui.h

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

revision 985 by capela, Sun Dec 17 22:29:29 2006 UTC revision 986 by capela, Mon Dec 18 16:51:50 2006 UTC
# Line 810  bool qsamplerMainForm::saveSessionFile ( Line 810  bool qsamplerMainForm::saveSessionFile (
810    
811  #ifdef CONFIG_MIDI_INSTRUMENT  #ifdef CONFIG_MIDI_INSTRUMENT
812          // MIDI instrument mapping...          // MIDI instrument mapping...
813            QMap<int, int> midiInstrumentMap;
814          int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient);          int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient);
815          for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) {          for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) {
816                  int iMidiMap = piMaps[iMap];                  int iMidiMap = piMaps[iMap];
817                  const char *pszMapName                  const char *pszMapName
818                          = ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap);                          = ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap);
819                  ts << "# " << tr("MIDI instrument map") << " " << iMidiMap;                  ts << "# " << tr("MIDI instrument map") << " " << iMap;
820                  if (pszMapName)                  if (pszMapName)
821                          ts << " - " << pszMapName;                          ts << " - " << pszMapName;
822                  ts << endl;                  ts << endl;
# Line 831  bool qsamplerMainForm::saveSessionFile ( Line 832  bool qsamplerMainForm::saveSessionFile (
832                                  = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]);                                  = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]);
833                          if (pInstrInfo) {                          if (pInstrInfo) {
834                                  ts << "MAP MIDI_INSTRUMENT "                                  ts << "MAP MIDI_INSTRUMENT "
835                                          << pInstrs[iInstr].map         << " "                                          << iMap                        << " "
836                                          << pInstrs[iInstr].bank        << " "                                          << pInstrs[iInstr].bank        << " "
837                                          << pInstrs[iInstr].prog        << " "                                          << pInstrs[iInstr].prog        << " "
838                                          << pInstrInfo->engine_name     << " '"                                          << pInstrInfo->engine_name     << " '"
# Line 855  bool qsamplerMainForm::saveSessionFile ( Line 856  bool qsamplerMainForm::saveSessionFile (
856                                          ts << " '" << pInstrInfo->name << "'";                                          ts << " '" << pInstrInfo->name << "'";
857                                  ts << endl;                                  ts << endl;
858                          }                          }
859                            // MIDI device index/id mapping.
860                            midiInstrumentMap[iMidiMap] = iMap;
861                          // Try to keep it snappy :)                          // Try to keep it snappy :)
862                          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);                          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
863                  }                  }
# Line 915  bool qsamplerMainForm::saveSessionFile ( Line 918  bool qsamplerMainForm::saveSessionFile (
918  #ifdef CONFIG_MIDI_INSTRUMENT  #ifdef CONFIG_MIDI_INSTRUMENT
919                                  if (pChannel->midiMap() >= 0) {                                  if (pChannel->midiMap() >= 0) {
920                                          ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel                                          ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel
921                                                  << " " << pChannel->midiChannel() << endl;                                                  << " " << midiInstrumentMap[pChannel->midiMap()] << endl;
922                                  }                                  }
923  #endif  #endif
924                  ts << endl;                  ts << endl;

Legend:
Removed from v.985  
changed lines
  Added in v.986

  ViewVC Help
Powered by ViewVC