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

Diff of /linuxsampler/trunk/src/engines/gig/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-2008 Christian Schoenebeck                         *   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *
7   *   Copyright (C) 2009-2010 Christian Schoenebeck and Grigor Iliev        *   *   Copyright (C) 2009-2011 Christian Schoenebeck and 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 58  namespace LinuxSampler { namespace gig { Line 58  namespace LinuxSampler { namespace gig {
58       *  @param Program     - MIDI program change number       *  @param Program     - MIDI program change number
59       */       */
60      void EngineChannel::SendProgramChange(uint8_t Program) {      void EngineChannel::SendProgramChange(uint8_t Program) {
61            SetMidiProgram(Program);
62          Engine* engine = dynamic_cast<Engine*>(pEngine);          Engine* engine = dynamic_cast<Engine*>(pEngine);
63          if(engine == NULL) return;          if(engine == NULL) return;
64    
65          if(engine->GetDiskThread()) {          if(engine->GetDiskThread()) {
66              engine->GetDiskThread()->OrderProgramChange(Program, this);              uint32_t merged = (GetMidiBankMsb() << 16) | (GetMidiBankLsb() << 8) | Program;
67                engine->GetDiskThread()->OrderProgramChange(merged, this);
68          } else {          } else {
69              // TODO:              // TODO:
70          }          }

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

  ViewVC Help
Powered by ViewVC