/[svn]/qsampler/trunk/src/qsamplerMainForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMainForm.cpp

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

revision 1626 by schoenebeck, Sat Jan 5 13:29:11 2008 UTC revision 1691 by schoenebeck, Thu Feb 14 22:31:26 2008 UTC
# Line 551  void MainForm::customEvent(QEvent* pCust Line 551  void MainForm::customEvent(QEvent* pCust
551          // For the time being, just pump it to messages.          // For the time being, just pump it to messages.
552          if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) {          if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) {
553                  CustomEvent *pEvent = static_cast<CustomEvent *> (pCustomEvent);                  CustomEvent *pEvent = static_cast<CustomEvent *> (pCustomEvent);
554                  if (pEvent->event() == LSCP_EVENT_CHANNEL_INFO) {                  switch (pEvent->event()) {
555                          int iChannelID = pEvent->data().toInt();                          case LSCP_EVENT_CHANNEL_INFO: {
556                          ChannelStrip *pChannelStrip = channelStrip(iChannelID);                                  int iChannelID = pEvent->data().toInt();
557                          if (pChannelStrip)                                  ChannelStrip *pChannelStrip = channelStrip(iChannelID);
558                                  channelStripChanged(pChannelStrip);                                  if (pChannelStrip)
559                  } else {                                          channelStripChanged(pChannelStrip);
560                          appendMessagesColor(tr("Notify event: %1 data: %2")                                  break;
561                                  .arg(::lscp_event_to_text(pEvent->event()))                          }
562                                  .arg(pEvent->data()), "#996699");  #if CONFIG_LSCP_CHANNEL_MIDI
563                            case LSCP_EVENT_CHANNEL_MIDI: {
564                                    int iChannelID = pEvent->data().toInt();
565                                    ChannelStrip *pChannelStrip = channelStrip(iChannelID);
566                                    if (pChannelStrip)
567                                            pChannelStrip->midiArrived();
568                                    break;
569                            }
570    #endif
571                            default:
572                                    appendMessagesColor(tr("Notify event: %1 data: %2")
573                                            .arg(::lscp_event_to_text(pEvent->event()))
574                                            .arg(pEvent->data()), "#996699");
575                  }                  }
576          }          }
577  }  }
# Line 2605  bool MainForm::startClient (void) Line 2617  bool MainForm::startClient (void)
2617    
2618          // Subscribe to channel info change notifications...          // Subscribe to channel info change notifications...
2619          if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK)          if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK)
2620                  appendMessagesClient("lscp_client_subscribe");                  appendMessagesClient("lscp_client_subscribe(CHANNEL_INFO)");
2621    
2622    #if CONFIG_LSCP_CHANNEL_MIDI
2623            // Subscribe to channel MIDI data notifications...
2624            if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK)
2625                    appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)");
2626    #endif
2627    
2628          // We may stop scheduling around.          // We may stop scheduling around.
2629          stopSchedule();          stopSchedule();
# Line 2659  void MainForm::stopClient (void) Line 2677  void MainForm::stopClient (void)
2677          closeSession(false);          closeSession(false);
2678    
2679          // Close us as a client...          // Close us as a client...
2680    #if CONFIG_LSCP_CHANNEL_MIDI
2681            ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI);
2682    #endif
2683          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);
2684          ::lscp_client_destroy(m_pClient);          ::lscp_client_destroy(m_pClient);
2685          m_pClient = NULL;          m_pClient = NULL;

Legend:
Removed from v.1626  
changed lines
  Added in v.1691

  ViewVC Help
Powered by ViewVC