/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInstrumentMapper.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInstrumentMapper.cpp

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

revision 970 by schoenebeck, Wed Dec 6 22:28:17 2006 UTC revision 3052 by schoenebeck, Wed Dec 14 17:34:54 2016 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2006 Christian Schoenebeck                              *   *   Copyright (C) 2006 - 2013 Christian Schoenebeck                       *
4   *                                                                         *   *                                                                         *
5   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 20  Line 20 
20    
21  #include "MidiInstrumentMapper.h"  #include "MidiInstrumentMapper.h"
22    
23    #include "../../common/global_private.h"
24  #include "../../common/Mutex.h"  #include "../../common/Mutex.h"
25  #include "../../engines/EngineFactory.h"  #include "../../engines/EngineFactory.h"
26  #include "../../engines/Engine.h"  #include "../../engines/Engine.h"
27    
28    #if AC_APPLE_UNIVERSAL_BUILD
29    # include <libgig/RIFF.h>
30    #else
31    # include <RIFF.h>
32    #endif
33    
34  namespace LinuxSampler {  namespace LinuxSampler {
35    
36      // same as entry_t but without 'LoadMode'      // same as entry_t but without 'LoadMode'
# Line 35  namespace LinuxSampler { Line 42  namespace LinuxSampler {
42          String Name;          String Name;
43      };      };
44    
45      // here we store all mappings (MIDI bank&prog) -> (Engine,File,Index)      // internal map type (MIDI bank&prog) -> (Engine,File,Index)
46      std::map<midi_prog_index_t,private_entry_t> midiMap;      class MidiInstrumentMap : public std::map<midi_prog_index_t,private_entry_t> {
47            public:
48                String name;
49        };
50    
51        // here we store all maps
52        std::map<int,MidiInstrumentMap> midiMaps;
53    
54        // for synchronization of midiMaps
55        Mutex midiMapsMutex;
56    
57        ListenerList<MidiInstrumentCountListener*> MidiInstrumentMapper::llMidiInstrumentCountListeners;
58        ListenerList<MidiInstrumentInfoListener*> MidiInstrumentMapper::llMidiInstrumentInfoListeners;
59        ListenerList<MidiInstrumentMapCountListener*> MidiInstrumentMapper::llMidiInstrumentMapCountListeners;
60        ListenerList<MidiInstrumentMapInfoListener*> MidiInstrumentMapper::llMidiInstrumentMapInfoListeners;
61        int MidiInstrumentMapper::DefaultMap;
62        
63        void MidiInstrumentMapper::AddMidiInstrumentCountListener(MidiInstrumentCountListener* l) {
64            llMidiInstrumentCountListeners.AddListener(l);
65        }
66    
67        void MidiInstrumentMapper::RemoveMidiInstrumentCountListener(MidiInstrumentCountListener* l) {
68            llMidiInstrumentCountListeners.RemoveListener(l);
69        }
70    
71        void MidiInstrumentMapper::fireMidiInstrumentCountChanged(int MapId, int NewCount) {
72            for (int i = 0; i < llMidiInstrumentCountListeners.GetListenerCount(); i++) {
73                llMidiInstrumentCountListeners.GetListener(i)->MidiInstrumentCountChanged(MapId, NewCount);
74            }
75        }
76    
77        void MidiInstrumentMapper::AddMidiInstrumentInfoListener(MidiInstrumentInfoListener* l) {
78            llMidiInstrumentInfoListeners.AddListener(l);
79        }
80    
81        void MidiInstrumentMapper::RemoveMidiInstrumentInfoListener(MidiInstrumentInfoListener* l) {
82            llMidiInstrumentInfoListeners.RemoveListener(l);
83        }
84    
85        void MidiInstrumentMapper::fireMidiInstrumentInfoChanged(int MapId, int Bank, int Program) {
86            for (int i = 0; i < llMidiInstrumentInfoListeners.GetListenerCount(); i++) {
87                llMidiInstrumentInfoListeners.GetListener(i)->MidiInstrumentInfoChanged(MapId, Bank, Program);
88            }
89        }
90    
91        void MidiInstrumentMapper::AddMidiInstrumentMapCountListener(MidiInstrumentMapCountListener* l) {
92            llMidiInstrumentMapCountListeners.AddListener(l);
93        }
94    
95      // for synchronization of midiMap      void MidiInstrumentMapper::RemoveMidiInstrumentMapCountListener(MidiInstrumentMapCountListener* l) {
96      Mutex midiMapMutex;          llMidiInstrumentMapCountListeners.RemoveListener(l);
97        }
98    
99        void MidiInstrumentMapper::fireMidiInstrumentMapCountChanged(int NewCount) {
100            for (int i = 0; i < llMidiInstrumentMapCountListeners.GetListenerCount(); i++) {
101                llMidiInstrumentMapCountListeners.GetListener(i)->MidiInstrumentMapCountChanged(NewCount);
102            }
103        }
104    
105        void MidiInstrumentMapper::AddMidiInstrumentMapInfoListener(MidiInstrumentMapInfoListener* l) {
106            llMidiInstrumentMapInfoListeners.AddListener(l);
107        }
108    
109        void MidiInstrumentMapper::RemoveMidiInstrumentMapInfoListener(MidiInstrumentMapInfoListener* l) {
110            llMidiInstrumentMapInfoListeners.RemoveListener(l);
111        }
112    
113        void MidiInstrumentMapper::fireMidiInstrumentMapInfoChanged(int MapId) {
114            for (int i = 0; i < llMidiInstrumentMapInfoListeners.GetListenerCount(); i++) {
115                llMidiInstrumentMapInfoListeners.GetListener(i)->MidiInstrumentMapInfoChanged(MapId);
116            }
117        }
118    
119      void MidiInstrumentMapper::AddOrReplaceMapping(midi_prog_index_t Index, entry_t Entry, bool bInBackground) throw (Exception) {      void MidiInstrumentMapper::AddOrReplaceEntry(int Map, midi_prog_index_t Index, entry_t Entry, bool bInBackground) throw (Exception) {
120          if (bInBackground) {          if (bInBackground) {
121              dmsg(3,("MidiInstrumentMapper: updating mapping (%d,%d,%d) -> ('%s','%s',%d) with vol=%f, mode=%d in background\n",              dmsg(3,("MidiInstrumentMapper: updating mapping %d (%d,%d,%d) -> ('%s','%s',%d) with vol=%f, mode=%d in background\n",
122                    Map,
123                  Index.midi_bank_msb,Index.midi_bank_lsb,Index.midi_prog,                  Index.midi_bank_msb,Index.midi_bank_lsb,Index.midi_prog,
124                  Entry.EngineName.c_str(),Entry.InstrumentFile.c_str(),Entry.InstrumentIndex,                  Entry.EngineName.c_str(),Entry.InstrumentFile.c_str(),Entry.InstrumentIndex,
125                  Entry.Volume,Entry.LoadMode)                  Entry.Volume,Entry.LoadMode)
126              );              );
127          } else {          } else {
128              dmsg(3,("MidiInstrumentMapper: updating mapping (%d,%d,%d) -> ('%s','%s',%d) with vol=%f, mode=%d\n",              dmsg(3,("MidiInstrumentMapper: updating mapping %d (%d,%d,%d) -> ('%s','%s',%d) with vol=%f, mode=%d\n",
129                    Map,
130                  Index.midi_bank_msb,Index.midi_bank_lsb,Index.midi_prog,                  Index.midi_bank_msb,Index.midi_bank_lsb,Index.midi_prog,
131                  Entry.EngineName.c_str(),Entry.InstrumentFile.c_str(),Entry.InstrumentIndex,                  Entry.EngineName.c_str(),Entry.InstrumentFile.c_str(),Entry.InstrumentIndex,
132                  Entry.Volume,Entry.LoadMode)                  Entry.Volume,Entry.LoadMode)
133              );              );
134          }          }
135            {
136                LockGuard lock(midiMapsMutex);
137                if (midiMaps.empty()) {
138                    throw Exception("There is no MIDI instrument map, you have to add one first.");
139                }
140            }
141          if (!Entry.InstrumentFile.size())          if (!Entry.InstrumentFile.size())
142              throw Exception("No instrument file name given");              throw Exception("No instrument file name given");
143            // TODO: an easy one - we should check here if given file exists and throw an exception if it doesn't
144          if (Entry.Volume < 0.0)          if (Entry.Volume < 0.0)
145              throw Exception("Volume may not be a negative value");              throw Exception("Volume may not be a negative value");
146          Engine* pEngine = EngineFactory::Create(Entry.EngineName);          Engine* pEngine = EngineFactory::Create(Entry.EngineName);
# Line 68  namespace LinuxSampler { Line 151  namespace LinuxSampler {
151              InstrumentManager::instrument_id_t id;              InstrumentManager::instrument_id_t id;
152              id.FileName = Entry.InstrumentFile;              id.FileName = Entry.InstrumentFile;
153              id.Index    = Entry.InstrumentIndex;              id.Index    = Entry.InstrumentIndex;
154              if (Entry.LoadMode != VOID) {              if (Entry.LoadMode != DONTCARE) {
155                  if (bInBackground)                  if (bInBackground)
156                      pEngine->GetInstrumentManager()->SetModeInBackground(id, static_cast<InstrumentManager::mode_t>(Entry.LoadMode));                      pEngine->GetInstrumentManager()->SetModeInBackground(id, static_cast<InstrumentManager::mode_t>(Entry.LoadMode));
157                  else                  else
158                      pEngine->GetInstrumentManager()->SetMode(id, static_cast<InstrumentManager::mode_t>(Entry.LoadMode));                      try { pEngine->GetInstrumentManager()->SetMode(id, static_cast<InstrumentManager::mode_t>(Entry.LoadMode)); }
159                        catch (RIFF::Exception e) { throw Exception(e.Message); }
160              }              }
161          } else {          } else {
162              dmsg(1,("WARNING: no InstrumentManager for engine '%s'\n",Entry.EngineName.c_str()));              dmsg(1,("WARNING: no InstrumentManager for engine '%s'\n",Entry.EngineName.c_str()));
# Line 83  namespace LinuxSampler { Line 167  namespace LinuxSampler {
167          privateEntry.InstrumentIndex = Entry.InstrumentIndex;          privateEntry.InstrumentIndex = Entry.InstrumentIndex;
168          privateEntry.Volume          = Entry.Volume;          privateEntry.Volume          = Entry.Volume;
169          privateEntry.Name            = Entry.Name;          privateEntry.Name            = Entry.Name;
170          midiMapMutex.Lock();  
171          midiMap[Index] = privateEntry;          bool Replaced = false;
172          midiMapMutex.Unlock();          int InstrCount = 0;
173            bool MapFound = false;
174            {
175                LockGuard lock(midiMapsMutex);
176                std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
177                if (iterMap != midiMaps.end()) { // map found
178                    MapFound = true;
179                    Replaced = (iterMap->second.find(Index) != iterMap->second.end());
180                    iterMap->second[Index] = privateEntry;
181                    InstrCount = iterMap->second.size();
182                }
183            }
184          EngineFactory::Destroy(pEngine);          EngineFactory::Destroy(pEngine);
185            if (!MapFound) {
186                throw Exception("There is no MIDI instrument map " + ToString(Map));
187            }
188    
189            if (Replaced) {
190                int Bank = (int(Index.midi_bank_msb) << 7) | int(Index.midi_bank_lsb);
191                fireMidiInstrumentInfoChanged(Map, Bank, Index.midi_prog);
192            } else {
193                fireMidiInstrumentCountChanged(Map, InstrCount);
194            }
195      }      }
196    
197      void MidiInstrumentMapper::RemoveMapping(midi_prog_index_t Index) {      void MidiInstrumentMapper::SetLoadMode(entry_t* pEntry) {
198          midiMapMutex.Lock();          Engine* pEngine = EngineFactory::Create(pEntry->EngineName);
199          midiMap.erase(Index);          if (!pEngine) { // invalid mapping
200          midiMapMutex.Unlock();              throw Exception("Invalid mapping");
201            }
202    
203            InstrumentManager* pManager = pEngine->GetInstrumentManager();
204            if (pManager) { // engine provides an InstrumentManager
205                InstrumentManager::instrument_id_t id;
206                id.FileName = pEntry->InstrumentFile;
207                id.Index    = pEntry->InstrumentIndex;
208                pEntry->LoadMode = static_cast<mode_t>(pManager->GetMode(id));
209            } else { // engine does not provide an InstrumentManager
210                // use default value
211                pEntry->LoadMode = ON_DEMAND;
212            }
213    
214            EngineFactory::Destroy(pEngine);
215      }      }
216    
217      void MidiInstrumentMapper::RemoveAllMappings() {      MidiInstrumentMapper::entry_t MidiInstrumentMapper::GetEntry(int Map, uint MidiBank, uint MidiProg) {
218          midiMapMutex.Lock();          LockGuard lock(midiMapsMutex);
219          midiMap.clear();  
220          midiMapMutex.Unlock();          std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
221            if (iterMap == midiMaps.end()) { // no such map
222                throw Exception("There is no MIDI instrument map " + ToString(Map));
223            }
224    
225            midi_prog_index_t idx;
226            idx.midi_bank_msb = (MidiBank >> 7) & 0x7f;
227            idx.midi_bank_lsb = MidiBank & 0x7f;
228            idx.midi_prog     = MidiProg;
229    
230            std::map<midi_prog_index_t,private_entry_t>::iterator iterEntry = iterMap->second.find(idx);
231            if (iterEntry == iterMap->second.end()) {
232                throw Exception("There is no map entry with that index");
233            }
234    
235            entry_t entry;
236            entry.EngineName      = iterEntry->second.EngineName;
237            entry.InstrumentFile  = iterEntry->second.InstrumentFile;
238            entry.InstrumentIndex = iterEntry->second.InstrumentIndex;
239            entry.Volume          = iterEntry->second.Volume;
240            entry.Name            = iterEntry->second.Name;
241    
242            try {
243                SetLoadMode(&entry);
244            } catch(Exception e) {
245                throw e;
246            }
247    
248            return entry;
249      }      }
250    
251      std::map<midi_prog_index_t,MidiInstrumentMapper::entry_t> MidiInstrumentMapper::Mappings() {      void MidiInstrumentMapper::RemoveEntry(int Map, midi_prog_index_t Index) {
252            int InstrCount = -1;
253            {
254                LockGuard lock(midiMapsMutex);
255    
256                std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
257                if (iterMap != midiMaps.end()) { // map found
258                    iterMap->second.erase(Index); // remove entry
259                    InstrCount = iterMap->second.size();
260                }
261            }
262            
263            if (InstrCount != -1) {
264                fireMidiInstrumentCountChanged(Map, InstrCount);
265            }
266        }
267    
268        void MidiInstrumentMapper::RemoveAllEntries(int Map) {
269            int InstrCount = -1;
270            {
271                LockGuard lock(midiMapsMutex);
272    
273                std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
274                if (iterMap != midiMaps.end()) { // map found
275                    iterMap->second.clear(); // clear that map
276                    InstrCount = 0;
277                }
278            }
279            
280            if (InstrCount != -1) {
281                fireMidiInstrumentCountChanged(Map, InstrCount);
282            }
283        }
284    
285        std::map<midi_prog_index_t,MidiInstrumentMapper::entry_t> MidiInstrumentMapper::Entries(int Map) throw (Exception) {
286          std::map<midi_prog_index_t,entry_t> result;          std::map<midi_prog_index_t,entry_t> result;
287    
288          // copy the internal map first          // copy the internal map first
289          midiMapMutex.Lock();          {
290          for (std::map<midi_prog_index_t,private_entry_t>::iterator iter = midiMap.begin();              LockGuard lock(midiMapsMutex);
291               iter != midiMap.end(); iter++)  
292          {              std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
293              entry_t entry;              if (iterMap == midiMaps.end()) { // no such map
294              entry.EngineName      = iter->second.EngineName;                  throw Exception("There is no MIDI instrument map " + ToString(Map));
295              entry.InstrumentFile  = iter->second.InstrumentFile;              }
296              entry.InstrumentIndex = iter->second.InstrumentIndex;              for (std::map<midi_prog_index_t,private_entry_t>::iterator iterEntry = iterMap->second.begin();
297              entry.Volume          = iter->second.Volume;                   iterEntry != iterMap->second.end(); iterEntry++)
298              entry.Name            = iter->second.Name;              {
299              result[iter->first] = entry;                  entry_t entry;
300                    entry.EngineName      = iterEntry->second.EngineName;
301                    entry.InstrumentFile  = iterEntry->second.InstrumentFile;
302                    entry.InstrumentIndex = iterEntry->second.InstrumentIndex;
303                    entry.Volume          = iterEntry->second.Volume;
304                    entry.Name            = iterEntry->second.Name;
305                    result[iterEntry->first] = entry;
306                }
307          }          }
308          midiMapMutex.Unlock();  
309          // complete it with current LoadMode of each entry          // complete it with current LoadMode of each entry
310          for (std::map<midi_prog_index_t,entry_t>::iterator iter = result.begin();          for (std::map<midi_prog_index_t,entry_t>::iterator iter = result.begin();
311               iter != result.end(); iter++)               iter != result.end(); iter++)
312          {          {
313              entry_t& entry = iter->second;              try {
314              Engine* pEngine = EngineFactory::Create(entry.EngineName);                  SetLoadMode(&(iter->second));
315              if (!pEngine) { // invalid mapping              } catch(Exception e) {
316                  RemoveMapping(iter->first);                  RemoveEntry(Map, iter->first);
317                  result.erase(iter);                  result.erase(iter);
                 continue;  
             }  
             InstrumentManager* pManager = pEngine->GetInstrumentManager();  
             if (pManager) { // engine provides an InstrumentManager  
                 InstrumentManager::instrument_id_t id;  
                 id.FileName = entry.InstrumentFile;  
                 id.Index    = entry.InstrumentIndex;  
                 entry.LoadMode = static_cast<mode_t>(pManager->GetMode(id));  
             } else { // engine does not provide an InstrumentManager  
                 // use default value  
                 entry.LoadMode = ON_DEMAND;  
318              }              }
             EngineFactory::Destroy(pEngine);  
319          }          }
320          return result;          return result;
321      }      }
322    
323      optional<MidiInstrumentMapper::entry_t> MidiInstrumentMapper::GetEntry(midi_prog_index_t Index) {      std::vector<int> MidiInstrumentMapper::Maps() {
324            std::vector<int> result;
325            LockGuard lock(midiMapsMutex);
326            for (std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.begin();
327                 iterMap != midiMaps.end(); iterMap++)
328            {
329                result.push_back(iterMap->first);
330            }
331            return result;
332        }
333    
334        int MidiInstrumentMapper::GetMapCount() {
335            LockGuard lock(midiMapsMutex);
336            return midiMaps.size();
337        }
338    
339        int MidiInstrumentMapper::GetInstrumentCount(int Map) {
340            LockGuard lock(midiMapsMutex);
341            std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
342            if (iterMap == midiMaps.end()) { // no such map
343                throw Exception("There is no MIDI instrument map " + ToString(Map));
344            }
345    
346            return iterMap->second.size();
347        }
348    
349        int MidiInstrumentMapper::GetInstrumentCount() {
350            int count = 0;
351    
352            LockGuard lock(midiMapsMutex);
353            std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.begin();
354            for (;iterMap != midiMaps.end(); iterMap++) {
355                count += iterMap->second.size();
356            }
357    
358            return count;
359        }
360    
361        int MidiInstrumentMapper::AddMap(String MapName) throw (Exception) {
362            int ID;
363            LockGuard lock(midiMapsMutex);
364    
365            if (midiMaps.empty()) ID = 0;
366            else {
367                // get the highest existing map ID
368                uint lastIndex = (--(midiMaps.end()))->first;
369                // check if we reached the index limit
370                if (lastIndex + 1 < lastIndex) {
371                    // search for an unoccupied map ID starting from 0
372                    for (uint i = 0; i < lastIndex; i++) {
373                        if (midiMaps.find(i) != midiMaps.end()) continue;
374                        // we found an unused ID, so insert the new map there
375                        ID = i;
376                        goto __create_map;
377                    }
378                    throw Exception("Internal error: could not find unoccupied MIDI instrument map ID.");
379                }
380                ID = lastIndex + 1;
381            }
382            __create_map:
383            midiMaps[ID].name = MapName;
384            
385            fireMidiInstrumentMapCountChanged(Maps().size());
386            // If there were no maps until now we must set a default map.
387            if (midiMaps.size() == 1) SetDefaultMap(ID);
388            
389            return ID;
390        }
391    
392        String MidiInstrumentMapper::MapName(int Map) throw (Exception) {
393            LockGuard lock(midiMapsMutex);
394            std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
395            if (iterMap == midiMaps.end()) {
396                throw Exception("There is no MIDI instrument map " + ToString(Map));
397            }
398            return iterMap->second.name;
399        }
400    
401        void MidiInstrumentMapper::RenameMap(int Map, String NewName) throw (Exception) {
402            {
403                LockGuard lock(midiMapsMutex);
404                std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
405                if (iterMap == midiMaps.end()) {
406                    throw Exception("There is no MIDI instrument map " + ToString(Map));
407                }
408                iterMap->second.name = NewName;
409            }
410            fireMidiInstrumentMapInfoChanged(Map);
411        }
412    
413        void MidiInstrumentMapper::RemoveMap(int Map) {
414            LockGuard lock(midiMapsMutex);
415            
416            midiMaps.erase(Map);
417            if (Map == GetDefaultMap()) {
418                SetDefaultMap(midiMaps.empty() ? -1 : (*(midiMaps.begin())).first);
419            }
420            fireMidiInstrumentMapCountChanged(Maps().size());
421        }
422    
423        void MidiInstrumentMapper::RemoveAllMaps() {
424            LockGuard lock(midiMapsMutex);
425    
426            midiMaps.clear();
427            SetDefaultMap(-1);
428            fireMidiInstrumentMapCountChanged(Maps().size());
429        }
430    
431        int MidiInstrumentMapper::GetDefaultMap() {
432            LockGuard lock(midiMapsMutex);
433    
434            return DefaultMap;
435        }
436    
437        void MidiInstrumentMapper::SetDefaultMap(int MapId) {
438            {
439                LockGuard lock(midiMapsMutex);
440    
441                DefaultMap = MapId;
442            }
443            
444            if (MapId != -1) fireMidiInstrumentMapInfoChanged(MapId);
445        }
446    
447        optional<MidiInstrumentMapper::entry_t> MidiInstrumentMapper::GetEntry(int Map, midi_prog_index_t Index) {
448          optional<entry_t> result;          optional<entry_t> result;
449          midiMapMutex.Lock();          LockGuard lock(midiMapsMutex);
450          std::map<midi_prog_index_t,private_entry_t>::iterator iter = midiMap.find(Index);  
451          if (iter != midiMap.end()) {          std::map<int,MidiInstrumentMap>::iterator iterMap = midiMaps.find(Map);
452              entry_t entry;          if (iterMap != midiMaps.end()) { // map found
453              entry.EngineName      = iter->second.EngineName;              std::map<midi_prog_index_t,private_entry_t>::iterator iterEntry = iterMap->second.find(Index);
454              entry.InstrumentFile  = iter->second.InstrumentFile;              if (iterEntry != iterMap->second.end()) {
455              entry.InstrumentIndex = iter->second.InstrumentIndex;                  entry_t entry;
456              entry.Volume          = iter->second.Volume;                  entry.EngineName      = iterEntry->second.EngineName;
457              //TODO: for now we skip the LoadMode and Name entry here, since we don't need it in the MidiInputPort                  entry.InstrumentFile  = iterEntry->second.InstrumentFile;
458              result = entry;                  entry.InstrumentIndex = iterEntry->second.InstrumentIndex;
459                    entry.Volume          = iterEntry->second.Volume;
460                    //TODO: for now we skip the LoadMode and Name entry here, since we don't need it in the EngineChannel
461                    result = entry;
462                }
463          }          }
         midiMapMutex.Unlock();  
464          return result;          return result;
465      }      }
466    

Legend:
Removed from v.970  
changed lines
  Added in v.3052

  ViewVC Help
Powered by ViewVC