/[svn]/linuxsampler/trunk/src/engines/common/DiskThreadBase.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/DiskThreadBase.h

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

revision 2671 by schoenebeck, Sun Jan 12 11:27:05 2014 UTC revision 2672 by schoenebeck, Sat Sep 6 13:04:01 2014 UTC
# Line 26  Line 26 
26  #ifndef __LS_DISKTHREADBASE_H__  #ifndef __LS_DISKTHREADBASE_H__
27  #define __LS_DISKTHREADBASE_H__  #define __LS_DISKTHREADBASE_H__
28    
29    #include <map>
30    
31  #include "StreamBase.h"  #include "StreamBase.h"
32  #include "../EngineChannel.h"  #include "../EngineChannel.h"
33  #include "../InstrumentManagerBase.h"  #include "../InstrumentManagerBase.h"
# Line 506  namespace LinuxSampler { Line 508  namespace LinuxSampler {
508                      // perform MIDI program change commands                      // perform MIDI program change commands
509                      if (ProgramChangeQueue.read_space() > 0) {                      if (ProgramChangeQueue.read_space() > 0) {
510                          program_change_command_t cmd;                          program_change_command_t cmd;
511                          // skip all old ones, only process the latest one                          std::map<EngineChannel*,uint32_t> cmds;
512                            // skip all old ones, only process the latest program
513                            // change command on each engine channel
514                          do {                          do {
515                              ProgramChangeQueue.pop(&cmd);                              ProgramChangeQueue.pop(&cmd);
516                                cmds[cmd.pEngineChannel] = cmd.Program;
517                          } while (ProgramChangeQueue.read_space() > 0);                          } while (ProgramChangeQueue.read_space() > 0);
518                          cmd.pEngineChannel->ExecuteProgramChange(cmd.Program);                          // now execute those latest program change commands on
519                            // their respective engine channel
520                            for (std::map<EngineChannel*,uint32_t>::const_iterator it = cmds.begin();
521                                 it != cmds.end(); ++it)
522                            {
523                                it->first->ExecuteProgramChange(it->second);
524                            }
525                      }                      }
526    
527                      RefillStreams(); // refill the most empty streams                      RefillStreams(); // refill the most empty streams

Legend:
Removed from v.2671  
changed lines
  Added in v.2672

  ViewVC Help
Powered by ViewVC