/[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 960 by capela, Sun Sep 24 12:47:51 2006 UTC revision 961 by capela, Sun Dec 3 18:26:13 2006 UTC
# Line 324  bool qsamplerChannelStrip::updateChannel Line 324  bool qsamplerChannelStrip::updateChannel
324      ChannelSetupPushButton->setText(sText);      ChannelSetupPushButton->setText(sText);
325    
326      // Check if we're up and connected.      // Check if we're up and connected.
327      if (m_pChannel->client() == NULL)          qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance();
328          return false;          if (pMainForm->client() == NULL)
329                    return false;
330    
331      // Read actual channel information.      // Read actual channel information.
332      m_pChannel->updateChannelInfo();      m_pChannel->updateChannelInfo();
# Line 383  bool qsamplerChannelStrip::updateChannel Line 384  bool qsamplerChannelStrip::updateChannel
384  {  {
385      if (m_pChannel == NULL)      if (m_pChannel == NULL)
386          return false;          return false;
387      if (m_pChannel->client() == NULL)  
388          return false;          qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance();
389            if (pMainForm->client() == NULL)
390                    return false;
391    
392          // This only makes sense on fully loaded channels...          // This only makes sense on fully loaded channels...
393          if (m_pChannel->instrumentStatus() < 100)          if (m_pChannel->instrumentStatus() < 100)
394              return false;              return false;
395    
396      // Get current channel voice count.      // Get current channel voice count.
397      int iVoiceCount  = ::lscp_get_channel_voice_count(m_pChannel->client(), m_pChannel->channelID());      int iVoiceCount  = ::lscp_get_channel_voice_count(pMainForm->client(), m_pChannel->channelID());
398      // Get current stream count.      // Get current stream count.
399      int iStreamCount = ::lscp_get_channel_stream_count(m_pChannel->client(), m_pChannel->channelID());      int iStreamCount = ::lscp_get_channel_stream_count(pMainForm->client(), m_pChannel->channelID());
400      // Get current channel buffer fill usage.      // Get current channel buffer fill usage.
401      // As benno has suggested this is the percentage usage      // As benno has suggested this is the percentage usage
402      // of the least filled buffer stream...      // of the least filled buffer stream...
403      int iStreamUsage = ::lscp_get_channel_stream_usage(m_pChannel->client(), m_pChannel->channelID());;      int iStreamUsage = ::lscp_get_channel_stream_usage(pMainForm->client(), m_pChannel->channelID());;
404    
405      // Update the GUI elements...      // Update the GUI elements...
406      StreamUsageProgressBar->setProgress(iStreamUsage);      StreamUsageProgressBar->setProgress(iStreamUsage);

Legend:
Removed from v.960  
changed lines
  Added in v.961

  ViewVC Help
Powered by ViewVC