/[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 145 by capela, Thu Jun 24 18:26:57 2004 UTC revision 182 by capela, Tue Jul 6 21:11:40 2004 UTC
# Line 330  void qsamplerChannelStrip::setDisplayFon Line 330  void qsamplerChannelStrip::setDisplayFon
330  }  }
331    
332  // Channel setup dialog.  // Channel setup dialog.
333  void qsamplerChannelStrip::channelSetup (void)  void qsamplerChannelStrip::channelSetup ( bool bNew )
334  {  {
335      qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this);      qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this);
336      if (pChannelForm) {      if (pChannelForm) {
337          pChannelForm->setup(this);          pChannelForm->setup(this, bNew);
338          if (pChannelForm->exec()) {          if (pChannelForm->exec()) {
339              updateChannelInfo();              updateChannelInfo();
340              emit channelChanged(this);              emit channelChanged(this);
# Line 448  void qsamplerChannelStrip::updateChannel Line 448  void qsamplerChannelStrip::updateChannel
448          return;          return;
449    
450      // Conditionally update whole channel status info.      // Conditionally update whole channel status info.
451      if (m_iInstrumentStatus >= 0 && m_iInstrumentStatus < 100)      if (m_iInstrumentStatus >= 0 && m_iInstrumentStatus < 100) {
452          updateChannelInfo();          updateChannelInfo();
453            // Once we get a complete instrument load, try a implied reset channel....
454            if (m_iInstrumentStatus == 100) {
455                if (::lscp_reset_channel(client(), m_iChannelID) != LSCP_OK)
456                    appendMessagesClient("lscp_reset_channel");
457                else
458                    appendMessages(tr("Channel %1 reset.").arg(m_iChannelID));
459            }
460        }
461        // Leave, if we still have an erroneus or incomplete instrument load.
462        if (m_iInstrumentStatus < 100)
463            return;
464    
465      // Get current channel voice count.      // Get current channel voice count.
466      int iVoiceCount  = ::lscp_get_channel_voice_count(client(), m_iChannelID);      int iVoiceCount  = ::lscp_get_channel_voice_count(client(), m_iChannelID);
# Line 458  void qsamplerChannelStrip::updateChannel Line 469  void qsamplerChannelStrip::updateChannel
469      // Get current channel buffer fill usage.      // Get current channel buffer fill usage.
470      // As benno has suggested this is the percentage usage      // As benno has suggested this is the percentage usage
471      // of the least filled buffer stream...      // of the least filled buffer stream...
472      int iStreamUsage = 0;      int iStreamUsage = ::lscp_get_channel_stream_usage(client(), m_iChannelID);;
473      if (iStreamCount > 0) {  
         lscp_buffer_fill_t *pBufferFill = ::lscp_get_channel_buffer_fill(client(), LSCP_USAGE_PERCENTAGE, m_iChannelID);  
         if (pBufferFill) {  
             for (int iStream = 0; iStream < iStreamCount; iStream++) {  
                 if (iStreamUsage > (int) pBufferFill[iStream].stream_usage || iStream == 0)  
                     iStreamUsage = pBufferFill[iStream].stream_usage;  
             }  
         }  
     }      
474      // Update the GUI elements...      // Update the GUI elements...
475      StreamUsageProgressBar->setProgress(iStreamUsage);      StreamUsageProgressBar->setProgress(iStreamUsage);
476      StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount));      StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount));
# Line 540  void qsamplerChannelStrip::setMaxVolume Line 543  void qsamplerChannelStrip::setMaxVolume
543    
544    
545  // end of qsamplerChannelStrip.ui.h  // end of qsamplerChannelStrip.ui.h
   

Legend:
Removed from v.145  
changed lines
  Added in v.182

  ViewVC Help
Powered by ViewVC