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

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

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

revision 757 by capela, Fri Aug 26 23:04:32 2005 UTC revision 758 by capela, Sun Aug 28 00:31:34 2005 UTC
# Line 87  void qsamplerChannelForm::setup ( qsampl Line 87  void qsamplerChannelForm::setup ( qsampl
87          // Load combo box history...          // Load combo box history...
88          pOptions->loadComboBoxHistory(InstrumentFileComboBox);          pOptions->loadComboBoxHistory(InstrumentFileComboBox);
89    
90            // Notify.that we've just changed one audio route.
91            QObject::connect(AudioRoutingTable, SIGNAL(valueChanged(int,int)),
92                    this, SLOT(changeAudioRouting(int,int)));
93    
94          // Populate Engines list.          // Populate Engines list.
95          const char **ppszEngines = ::lscp_list_available_engines(m_pChannel->client());          const char **ppszEngines = ::lscp_list_available_engines(m_pChannel->client());
96          if (ppszEngines) {          if (ppszEngines) {
# Line 214  void qsamplerChannelForm::accept (void) Line 218  void qsamplerChannelForm::accept (void)
218                                  iErrors++;                                  iErrors++;
219                          else if (!m_pChannel->setAudioDevice(pDevice->deviceID()))                          else if (!m_pChannel->setAudioDevice(pDevice->deviceID()))
220                                  iErrors++;                                  iErrors++;
221                            else if (!m_audioRouting.isEmpty()) {
222                                    // Set the audio route changes...
223                                    qsamplerChannelRoutingMap::ConstIterator iter;
224                                    for (iter = m_audioRouting.begin();
225                                                    iter != m_audioRouting.end(); ++iter) {
226                                            if (!m_pChannel->setAudioChannel(iter.key(), iter.data()))
227                                                    iErrors++;
228                                    }
229                            }
230                  }                  }
231                  // Accept MIDI driver or device selection...                  // Accept MIDI driver or device selection...
232                  if (m_midiDevices.isEmpty()) {                  if (m_midiDevices.isEmpty()) {
# Line 393  void qsamplerChannelForm::selectMidiDriv Line 406  void qsamplerChannelForm::selectMidiDriv
406                                          pDevice = m_midiDevices.next()) {                                          pDevice = m_midiDevices.next()) {
407                          if (pDevice->deviceID() == iDeviceID) {                          if (pDevice->deviceID() == iDeviceID) {
408                                  MidiDeviceComboBox->setCurrentItem(iMidiItem);                                  MidiDeviceComboBox->setCurrentItem(iMidiItem);
409                          //      selectMidiDeviceItem(iMidiItem);                                  selectMidiDeviceItem(iMidiItem);
410                                  break;                                  break;
411                          }                          }
412                          iMidiItem++;                          iMidiItem++;
# Line 492  void qsamplerChannelForm::selectAudioDri Line 505  void qsamplerChannelForm::selectAudioDri
505                                          pDevice = m_audioDevices.next()) {                                          pDevice = m_audioDevices.next()) {
506                          if (pDevice->deviceID() == iDeviceID) {                          if (pDevice->deviceID() == iDeviceID) {
507                                  AudioDeviceComboBox->setCurrentItem(iAudioItem);                                  AudioDeviceComboBox->setCurrentItem(iAudioItem);
508                          //      selectAudioDeviceItem(iAudioItem);                                  selectAudioDeviceItem(iAudioItem);
509                                  break;                                  break;
510                          }                          }
511                          iAudioItem++;                          iAudioItem++;
# Line 500  void qsamplerChannelForm::selectAudioDri Line 513  void qsamplerChannelForm::selectAudioDri
513          }          }
514          AudioDeviceTextLabel->setEnabled(bEnabled);          AudioDeviceTextLabel->setEnabled(bEnabled);
515          AudioDeviceComboBox->setEnabled(bEnabled);          AudioDeviceComboBox->setEnabled(bEnabled);
516            AudioRoutingTable->setEnabled(bEnabled);
517            if (!bEnabled)
518                    AudioRoutingTable->setNumRows(0);
519  }  }
520    
521    
# Line 519  void qsamplerChannelForm::selectAudioDev Line 535  void qsamplerChannelForm::selectAudioDev
535  {  {
536          qsamplerDevice *pDevice = m_audioDevices.at(iAudioItem);          qsamplerDevice *pDevice = m_audioDevices.at(iAudioItem);
537          if (pDevice) {          if (pDevice) {
538                  // Is there anything to do here?                  // Refresh the audio routing table.
539                    AudioRoutingTable->refresh(pDevice, m_pChannel->audioRouting());
540                    // Reset routing change map.
541                    m_audioRouting.clear();
542          }          }
543  }  }
544    
# Line 543  void qsamplerChannelForm::setupAudioDevi Line 562  void qsamplerChannelForm::setupAudioDevi
562  }  }
563    
564    
565    // Audio routing change slot.
566    void qsamplerChannelForm::changeAudioRouting ( int iRow, int iCol )
567    {
568            if (m_iDirtySetup > 0)
569                    return;
570            if (iRow < 0 || iCol < 0)
571                    return;
572    
573            // Verify that this is a QComboTableItem (magic rtti == 1)
574            QTableItem *pItem = AudioRoutingTable->item(iRow, iCol);
575            if (pItem == NULL)
576                    return;
577            if (pItem->rtti() == 1) {       // 1 == QComboTableItem
578                    QComboTableItem *pComboItem = (QComboTableItem *) pItem;
579                    // FIXME: Its not garanteed that we must have
580                    // iAudioOut == iRow on all times forth!
581                    m_audioRouting[iRow] = pComboItem->currentItem();
582                    // And let's get dirty...
583                    m_iDirtyCount++;
584            }
585    }
586    
587    
588  // UPdate all device lists slot.  // UPdate all device lists slot.
589  void qsamplerChannelForm::updateDevices (void)  void qsamplerChannelForm::updateDevices (void)
590  {  {

Legend:
Removed from v.757  
changed lines
  Added in v.758

  ViewVC Help
Powered by ViewVC