110 |
if (!empty) { |
if (!empty) { |
111 |
cmd = queue.front(); |
cmd = queue.front(); |
112 |
queue.pop_front(); |
queue.pop_front(); |
113 |
|
|
114 |
|
if (cmd.type == command_t::DIRECT_LOAD) { |
115 |
|
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); |
116 |
|
} |
117 |
} |
} |
118 |
mutex.Unlock(); |
mutex.Unlock(); |
119 |
if (empty) break; |
if (empty) break; |
121 |
try { |
try { |
122 |
switch (cmd.type) { |
switch (cmd.type) { |
123 |
case command_t::DIRECT_LOAD: |
case command_t::DIRECT_LOAD: |
|
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); |
|
124 |
cmd.pEngineChannel->PrepareLoadInstrument(cmd.instrumentId.FileName.c_str(), cmd.instrumentId.Index); |
cmd.pEngineChannel->PrepareLoadInstrument(cmd.instrumentId.FileName.c_str(), cmd.instrumentId.Index); |
125 |
cmd.pEngineChannel->LoadInstrument(); |
cmd.pEngineChannel->LoadInstrument(); |
126 |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, true); |
EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, true); |