/[svn]/linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sf2/EngineChannel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2026 by iliev, Fri Oct 23 17:53:17 2009 UTC revision 2027 by iliev, Tue Nov 3 19:27:42 2009 UTC
# Line 35  namespace LinuxSampler { namespace sf2 { Line 35  namespace LinuxSampler { namespace sf2 {
35          DisconnectAudioOutputDevice();          DisconnectAudioOutputDevice();
36          // In case the channel was removed before the instrument was          // In case the channel was removed before the instrument was
37          // fully loaded, try to give back instrument again (see bug #113)          // fully loaded, try to give back instrument again (see bug #113)
38          InstrumentChangeCmd< ::sf2::Region, ::sf2::InstrumentBase>& cmd = ChangeInstrument(NULL);          InstrumentChangeCmd< ::sf2::Region, ::sf2::Preset>& cmd = ChangeInstrument(NULL);
39          if (cmd.pInstrument) {          if (cmd.pInstrument) {
40                  InstrumentResourceManager* instrs = dynamic_cast<InstrumentResourceManager*>(pEngine->GetInstrumentManager());                  InstrumentResourceManager* instrs = dynamic_cast<InstrumentResourceManager*>(pEngine->GetInstrumentManager());
41                  instrs->HandBack(cmd.pInstrument, this);                  instrs->HandBack(cmd.pInstrument, this);
# Line 48  namespace LinuxSampler { namespace sf2 { Line 48  namespace LinuxSampler { namespace sf2 {
48      /** This method is not thread safe! */      /** This method is not thread safe! */
49      void EngineChannel::ResetInternal() {      void EngineChannel::ResetInternal() {
50          CurrentKeyDimension = 0;          CurrentKeyDimension = 0;
51          EngineChannelBase<Voice, ::sf2::Region, ::sf2::InstrumentBase>::ResetInternal();          EngineChannelBase<Voice, ::sf2::Region, ::sf2::Preset>::ResetInternal();
52          for(int i = 0; i < 128; i++) PressedKeys[i] = false;          for(int i = 0; i < 128; i++) PressedKeys[i] = false;
53      }      }
54    
# Line 84  namespace LinuxSampler { namespace sf2 { Line 84  namespace LinuxSampler { namespace sf2 {
84    
85          // make sure we don't trigger any new notes with an old          // make sure we don't trigger any new notes with an old
86          // instrument          // instrument
87          InstrumentChangeCmd< ::sf2::Region, ::sf2::InstrumentBase>& cmd = ChangeInstrument(0);          InstrumentChangeCmd< ::sf2::Region, ::sf2::Preset>& cmd = ChangeInstrument(0);
88          if (cmd.pInstrument) {          if (cmd.pInstrument) {
89              // give old instrument back to instrument manager, but              // give old instrument back to instrument manager, but
90              // keep the dimension regions and samples that are in use              // keep the dimension regions and samples that are in use
# Line 96  namespace LinuxSampler { namespace sf2 { Line 96  namespace LinuxSampler { namespace sf2 {
96          ActiveKeyGroups.clear();          ActiveKeyGroups.clear();
97    
98          // request sf2 instrument from instrument manager          // request sf2 instrument from instrument manager
99          ::sf2::InstrumentBase* newInstrument;          ::sf2::Preset* newInstrument;
100          try {          try {
101              InstrumentManager::instrument_id_t instrid;              InstrumentManager::instrument_id_t instrid;
102              instrid.FileName  = InstrumentFile;              instrid.FileName  = InstrumentFile;

Legend:
Removed from v.2026  
changed lines
  Added in v.2027

  ViewVC Help
Powered by ViewVC