/[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 751 by capela, Fri Aug 19 17:10:16 2005 UTC revision 1018 by capela, Wed Jan 10 19:39:00 2007 UTC
# Line 2  Line 2 
2  //  //
3  // ui.h extension file, included from the uic-generated form implementation.  // ui.h extension file, included from the uic-generated form implementation.
4  /****************************************************************************  /****************************************************************************
5     Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 14  Line 14 
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License along
18     along with this program; if not, write to the Free Software     with this program; if not, write to the Free Software Foundation, Inc.,
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21  *****************************************************************************/  *****************************************************************************/
22    
# 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 340  bool qsamplerChannelStrip::updateChannel Line 341  bool qsamplerChannelStrip::updateChannel
341          updateInstrumentName(false);          updateInstrumentName(false);
342    
343      // MIDI Port/Channel...      // MIDI Port/Channel...
344      if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)          QString sMidiPortChannel = QString::number(m_pChannel->midiPort()) + " / ";
345          MidiPortChannelTextLabel->setText(QString("%1 / *").arg(m_pChannel->midiPort()));          if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)
346      else                  sMidiPortChannel += tr("All");
347          MidiPortChannelTextLabel->setText(QString("%1 / %2").arg(m_pChannel->midiPort()).arg(m_pChannel->midiChannel() + 1));          else
348                    sMidiPortChannel += QString::number(m_pChannel->midiChannel() + 1);
349            MidiPortChannelTextLabel->setText(sMidiPortChannel);
350    
351      // Instrument status...      // Instrument status...
352      int iInstrumentStatus = m_pChannel->instrumentStatus();      int iInstrumentStatus = m_pChannel->instrumentStatus();
# Line 383  bool qsamplerChannelStrip::updateChannel Line 386  bool qsamplerChannelStrip::updateChannel
386  {  {
387      if (m_pChannel == NULL)      if (m_pChannel == NULL)
388          return false;          return false;
389      if (m_pChannel->client() == NULL)  
390          return false;          qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance();
391            if (pMainForm->client() == NULL)
392                    return false;
393    
394          // This only makes sense on fully loaded channels...          // This only makes sense on fully loaded channels...
395          if (m_pChannel->instrumentStatus() < 100)          if (m_pChannel->instrumentStatus() < 100)
396              return false;              return false;
397    
398      // Get current channel voice count.      // Get current channel voice count.
399      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());
400      // Get current stream count.      // Get current stream count.
401      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());
402      // Get current channel buffer fill usage.      // Get current channel buffer fill usage.
403      // As benno has suggested this is the percentage usage      // As benno has suggested this is the percentage usage
404      // of the least filled buffer stream...      // of the least filled buffer stream...
405      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());;
406    
407      // Update the GUI elements...      // Update the GUI elements...
408      StreamUsageProgressBar->setProgress(iStreamUsage);      StreamUsageProgressBar->setProgress(iStreamUsage);

Legend:
Removed from v.751  
changed lines
  Added in v.1018

  ViewVC Help
Powered by ViewVC