--- linuxsampler/trunk/src/linuxsampler.cpp 2007/06/22 10:10:06 1248 +++ linuxsampler/trunk/src/linuxsampler.cpp 2007/10/14 22:00:17 1424 @@ -25,8 +25,9 @@ #include #include "Sampler.h" +#include "common/global_private.h" #include "engines/EngineFactory.h" -#include "engines/InstrumentEditorFactory.h" +#include "plugins/InstrumentEditorFactory.h" #include "drivers/midi/MidiInputDeviceFactory.h" #include "drivers/audio/AudioOutputDeviceFactory.h" #include "engines/gig/Profiler.h" @@ -165,8 +166,8 @@ if (!pEngineChannel) continue; Engine* pEngine = pEngineChannel->GetEngine(); if (!pEngine) continue; - pSampler->fireVoiceCountChanged(iter->first, pEngine->VoiceCount()); - pSampler->fireStreamCountChanged(iter->first, pEngine->DiskStreamCount()); + pSampler->fireVoiceCountChanged(iter->first, pEngineChannel->GetVoiceCount()); + pSampler->fireStreamCountChanged(iter->first, pEngineChannel->GetDiskStreamCount()); pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); } @@ -291,7 +292,7 @@ if (res) { std::stringstream ss; - ss << "Fail to stat `" << optarg << "`: " << strerror(errno); + ss << "Failed to stat `" << optarg << "`: " << strerror(errno); throw Exception(ss.str()); } @@ -304,16 +305,17 @@ InstrumentsDb::GetInstrumentsDb()->SetDbFile(String(optarg)); } } catch(Exception e) { - std::cerr << e.Message() << std::endl << std::endl; - return; + std::cerr << "Could not open instruments DB file: " + << e.Message() << std::endl; + exit(EXIT_FAILURE); } - - return; + break; #else std::cerr << "LinuxSampler was not build with "; - std::cerr << "instruments database support." <