/[svn]/linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp

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

revision 2276 by persson, Wed Sep 22 18:59:16 2010 UTC revision 2277 by persson, Sat Oct 1 08:23:02 2011 UTC
# Line 4  Line 4 
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2009 Christian Schoenebeck                         *   *   Copyright (C) 2005-2009 Christian Schoenebeck                         *
7   *   Copyright (C) 2009-2010 Grigor Iliev                                  *   *   Copyright (C) 2009-2011 Grigor Iliev                                  *
8   *                                                                         *   *                                                                         *
9   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
10   *   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 60  namespace LinuxSampler { namespace sf2 { Line 60  namespace LinuxSampler { namespace sf2 {
60       *  @param Program     - MIDI program change number       *  @param Program     - MIDI program change number
61       */       */
62      void EngineChannel::SendProgramChange(uint8_t Program) {      void EngineChannel::SendProgramChange(uint8_t Program) {
63            SetMidiProgram(Program);
64          Engine* engine = dynamic_cast<Engine*>(pEngine);          Engine* engine = dynamic_cast<Engine*>(pEngine);
65          if(engine == NULL) return;          if(engine == NULL) return;
66    
67          if(engine->GetDiskThread()) {          if(engine->GetDiskThread()) {
68              engine->GetDiskThread()->OrderProgramChange(Program, this);              uint32_t merged = (GetMidiBankMsb() << 16) | (GetMidiBankLsb() << 8) | Program;
69                engine->GetDiskThread()->OrderProgramChange(merged, this);
70          } else {          } else {
71              // TODO:              // TODO:
72          }          }

Legend:
Removed from v.2276  
changed lines
  Added in v.2277

  ViewVC Help
Powered by ViewVC