1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2011 Christian Schoenebeck * |
4 |
* * |
* * |
5 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
6 |
* 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 * |
53 |
} |
} |
54 |
|
|
55 |
|
|
|
// already tell the engine which instrument to load |
|
|
pEngineChannel->PrepareLoadInstrument(Filename.c_str(), uiInstrumentIndex); |
|
|
|
|
56 |
command_t cmd; |
command_t cmd; |
57 |
cmd.type = command_t::DIRECT_LOAD; |
cmd.type = command_t::DIRECT_LOAD; |
58 |
cmd.pEngineChannel = pEngineChannel; |
cmd.pEngineChannel = pEngineChannel; |
59 |
|
cmd.instrumentId.Index = uiInstrumentIndex; |
60 |
|
cmd.instrumentId.FileName = Filename; |
61 |
|
|
62 |
mutex.Lock(); |
mutex.Lock(); |
63 |
queue.push_back(cmd); |
queue.push_back(cmd); |
115 |
switch (cmd.type) { |
switch (cmd.type) { |
116 |
case command_t::DIRECT_LOAD: |
case command_t::DIRECT_LOAD: |
117 |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); |
118 |
|
cmd.pEngineChannel->PrepareLoadInstrument(cmd.instrumentId.FileName.c_str(), cmd.instrumentId.Index); |
119 |
cmd.pEngineChannel->LoadInstrument(); |
cmd.pEngineChannel->LoadInstrument(); |
120 |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, true); |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, true); |
121 |
break; |
break; |