/[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 956 by capela, Sun Sep 24 12:47:51 2006 UTC revision 957 by capela, Wed Nov 29 11:48:26 2006 UTC
# Line 807  bool qsamplerMainForm::saveSessionFile ( Line 807  bool qsamplerMainForm::saveSessionFile (
807          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
808      }      }
809    
810    #ifdef CONFIG_MIDI_INSTRUMENT
811            // MIDI instrument mapping...
812            lscp_midi_instrument_t *pInstrs = ::lscp_list_midi_instruments(m_pClient);
813            if (pInstrs)
814            ts << "# " << tr("MIDI instrument mapping") << endl;
815            for (int iInstr = 0; pInstrs && pInstrs[iInstr].program >= 0; iInstr++) {
816                    lscp_midi_instrument_info_t *pInstrInfo
817                            = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]);
818                    if (pInstrInfo) {
819                            ts << "MAP MIDI_INSTRUMENT "
820                                    << pInstrs[iInstr].bank_msb    << " "
821                                    << pInstrs[iInstr].bank_lsb    << " "
822                                    << pInstrs[iInstr].program     << " "
823                                    << pInstrInfo->engine_name     << " '"
824                                    << pInstrInfo->instrument_file << "' "
825                                    << pInstrInfo->instrument_nr   << " "
826                                    << pInstrInfo->volume          << " ";
827                            switch (pInstrInfo->load_mode) {
828                                    case LSCP_LOAD_PERSISTENT:
829                                            ts << "PERSISTENT";
830                                            break;
831                                    case LSCP_LOAD_ON_DEMAND_HOLD:
832                                            ts << "ON_DEMAND_HOLD";
833                                            break;
834                                    case LSCP_LOAD_ON_DEMAND:
835                                    case LSCP_LOAD_DEFAULT:
836                                    default:
837                                            ts << "ON_DEMAND";
838                                            break;
839                            }
840                            if (pInstrInfo->name)
841                                    ts << " '" << pInstrInfo->name << "'";
842                            ts << endl;
843                    }
844                    ts << endl;
845            // Try to keep it snappy :)
846            QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
847            }
848    #endif //  CONFIG_MIDI_INSTRUMENT
849    
850      // Ok. we've wrote it.      // Ok. we've wrote it.
851      file.close();      file.close();
852    

Legend:
Removed from v.956  
changed lines
  Added in v.957

  ViewVC Help
Powered by ViewVC