--- linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp 2011/09/22 11:50:02 2276 +++ linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp 2011/10/01 08:23:02 2277 @@ -4,7 +4,7 @@ * * * Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * * Copyright (C) 2005-2009 Christian Schoenebeck * - * Copyright (C) 2009-2010 Grigor Iliev * + * Copyright (C) 2009-2011 Grigor Iliev * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -60,11 +60,13 @@ * @param Program - MIDI program change number */ void EngineChannel::SendProgramChange(uint8_t Program) { + SetMidiProgram(Program); Engine* engine = dynamic_cast(pEngine); if(engine == NULL) return; if(engine->GetDiskThread()) { - engine->GetDiskThread()->OrderProgramChange(Program, this); + uint32_t merged = (GetMidiBankMsb() << 16) | (GetMidiBankLsb() << 8) | Program; + engine->GetDiskThread()->OrderProgramChange(merged, this); } else { // TODO: }