/[svn]/qsampler/trunk/src/qsamplerChannelStrip.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannelStrip.ui.h

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

revision 297 by capela, Wed Nov 17 12:40:25 2004 UTC revision 302 by capela, Wed Nov 17 17:17:18 2004 UTC
# Line 75  void qsamplerChannelStrip::setup ( qsamp Line 75  void qsamplerChannelStrip::setup ( qsamp
75          m_pChannel->setChannelID(iChannelID);          m_pChannel->setChannelID(iChannelID);
76          m_iDirtyChange = 0;          m_iDirtyChange = 0;
77      }      }
78        
79      // Stabilize this around.      // Stabilize this around.
80      updateChannelInfo();      updateChannelInfo();
81  }  }
# Line 181  bool qsamplerChannelStrip::updateChannel Line 181  bool qsamplerChannelStrip::updateChannel
181      if (m_pChannel->instrumentFile().isEmpty())      if (m_pChannel->instrumentFile().isEmpty())
182          InstrumentNameTextLabel->setText(sIndent + tr("(No instrument)"));          InstrumentNameTextLabel->setText(sIndent + tr("(No instrument)"));
183      else      else
184          InstrumentNameTextLabel->setText(sIndent + QString("%1 [%2]")          InstrumentNameTextLabel->setText(sIndent + qsamplerChannel::getInstrumentName(m_pChannel->instrumentFile(), m_pChannel->instrumentNr()));
             .arg(QFileInfo(m_pChannel->instrumentFile()).fileName()).arg(m_pChannel->instrumentNr()));  
185    
186      // Instrument status...      // Instrument status...
187      int iInstrumentStatus = m_pChannel->instrumentStatus();      int iInstrumentStatus = m_pChannel->instrumentStatus();
# Line 247  bool qsamplerChannelStrip::updateChannel Line 246  bool qsamplerChannelStrip::updateChannel
246      if (m_pChannel->client() == NULL)      if (m_pChannel->client() == NULL)
247          return false;          return false;
248    
249      // Conditionally update whole channel status info.      // Update whole channel status info,
250      if (m_pChannel->instrumentStatus() >= 0 && m_pChannel->instrumentStatus() < 100) {      // if instrument load is still pending...
251        if (m_pChannel->instrumentStatus() < 100) {
252          updateChannelInfo();          updateChannelInfo();
253          // Once we get a complete instrument load, try a implied reset channel....          // Check (updated) status again...
254          if (m_pChannel->instrumentStatus() == 100)          if (m_pChannel->instrumentStatus() < 100)
255              m_pChannel->resetChannel();              return false;
256            // Once we get a complete instrument load,
257            // we'll try an implied channel reset...
258            m_pChannel->resetChannel();
259      }      }
260      // Leave, if we still have an erroneus or incomplete instrument load.      
261        // Check again that we're clean.
262      if (m_pChannel->instrumentStatus() < 100)      if (m_pChannel->instrumentStatus() < 100)
263          return false;          return false;
264    

Legend:
Removed from v.297  
changed lines
  Added in v.302

  ViewVC Help
Powered by ViewVC