23 |
|
|
24 |
#include "EngineChannel.h" |
#include "EngineChannel.h" |
25 |
|
|
26 |
|
#include "../../common/global_private.h" |
27 |
|
|
28 |
namespace LinuxSampler { namespace gig { |
namespace LinuxSampler { namespace gig { |
29 |
|
|
30 |
EngineChannel::EngineChannel() { |
EngineChannel::EngineChannel() { |
198 |
} |
} |
199 |
catch (RIFF::Exception e) { |
catch (RIFF::Exception e) { |
200 |
InstrumentStat = -2; |
InstrumentStat = -2; |
201 |
|
StatusChanged(true); |
202 |
String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message; |
String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message; |
203 |
throw Exception(msg); |
throw Exception(msg); |
204 |
} |
} |
205 |
catch (InstrumentManagerException e) { |
catch (InstrumentManagerException e) { |
206 |
InstrumentStat = -3; |
InstrumentStat = -3; |
207 |
|
StatusChanged(true); |
208 |
String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message(); |
String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message(); |
209 |
throw Exception(msg); |
throw Exception(msg); |
210 |
} |
} |
211 |
catch (...) { |
catch (...) { |
212 |
InstrumentStat = -4; |
InstrumentStat = -4; |
213 |
|
StatusChanged(true); |
214 |
throw Exception("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file."); |
throw Exception("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file."); |
215 |
} |
} |
216 |
|
|
223 |
|
|
224 |
if (pEngine) pEngine->ChangeInstrument(this, newInstrument); |
if (pEngine) pEngine->ChangeInstrument(this, newInstrument); |
225 |
else pInstrument = newInstrument; |
else pInstrument = newInstrument; |
226 |
|
|
227 |
|
StatusChanged(true); |
228 |
} |
} |
229 |
|
|
230 |
/** |
/** |
342 |
default: |
default: |
343 |
throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel)); |
throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel)); |
344 |
} |
} |
345 |
|
|
346 |
|
bStatusChanged = true; |
347 |
} |
} |
348 |
|
|
349 |
int EngineChannel::OutputChannel(uint EngineAudioChannel) { |
int EngineChannel::OutputChannel(uint EngineAudioChannel) { |