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 * |
62 |
* @param Program - MIDI program change number |
* @param Program - MIDI program change number |
63 |
*/ |
*/ |
64 |
void EngineChannel::SendProgramChange(uint8_t Program) { |
void EngineChannel::SendProgramChange(uint8_t Program) { |
65 |
|
SetMidiProgram(Program); |
66 |
Engine* engine = dynamic_cast<Engine*>(pEngine); |
Engine* engine = dynamic_cast<Engine*>(pEngine); |
67 |
if(engine == NULL) return; |
if(engine == NULL) return; |
68 |
|
|
69 |
if(engine->GetDiskThread()) { |
if(engine->GetDiskThread()) { |
70 |
engine->GetDiskThread()->OrderProgramChange(Program, this); |
uint32_t merged = (GetMidiBankMsb() << 16) | (GetMidiBankLsb() << 8) | Program; |
71 |
|
engine->GetDiskThread()->OrderProgramChange(merged, this); |
72 |
} else { |
} else { |
73 |
// TODO: |
// TODO: |
74 |
} |
} |