387 |
// For the time being, just pump it to messages. |
// For the time being, just pump it to messages. |
388 |
if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) { |
if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) { |
389 |
qsamplerCustomEvent *pEvent = (qsamplerCustomEvent *) pCustomEvent; |
qsamplerCustomEvent *pEvent = (qsamplerCustomEvent *) pCustomEvent; |
390 |
appendMessagesColor(tr("Notify event: %1 data: %2") |
if (pEvent->event() == LSCP_EVENT_CHANNEL_INFO) { |
391 |
.arg(::lscp_event_to_text(pEvent->event())) |
int iChannelID = pEvent->data().toInt(); |
392 |
.arg(pEvent->data()), "#996699"); |
qsamplerChannelStrip *pChannelStrip = channelStrip(iChannelID); |
393 |
|
if (pChannelStrip) |
394 |
|
channelStripChanged(pChannelStrip); |
395 |
|
} else { |
396 |
|
appendMessagesColor(tr("Notify event: %1 data: %2") |
397 |
|
.arg(::lscp_event_to_text(pEvent->event())) |
398 |
|
.arg(pEvent->data()), "#996699"); |
399 |
|
} |
400 |
} |
} |
401 |
} |
} |
402 |
|
|
1308 |
sText += ::lscp_client_version(); |
sText += ::lscp_client_version(); |
1309 |
#ifdef CONFIG_LIBGIG |
#ifdef CONFIG_LIBGIG |
1310 |
sText += ", "; |
sText += ", "; |
1311 |
sText += gig::libraryName(); |
sText += gig::libraryName().c_str(); |
1312 |
sText += " "; |
sText += " "; |
1313 |
sText += gig::libraryVersion(); |
sText += gig::libraryVersion().c_str(); |
1314 |
#endif |
#endif |
1315 |
sText += "<br />\n"; |
sText += "<br />\n"; |
1316 |
sText += "<br />\n"; |
sText += "<br />\n"; |
1640 |
if (m_pOptions->bMessagesLimit) |
if (m_pOptions->bMessagesLimit) |
1641 |
m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); |
m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); |
1642 |
else |
else |
1643 |
m_pMessages->setMessagesLimit(0); |
m_pMessages->setMessagesLimit(-1); |
1644 |
} |
} |
1645 |
} |
} |
1646 |
|
|
1824 |
} |
} |
1825 |
} |
} |
1826 |
|
|
1827 |
// Refresh each channel usage, on each period... |
if (m_pClient) { |
1828 |
if (m_pClient && (m_changedStrips.count() > 0 || m_pOptions->bAutoRefresh)) { |
// Update the channel information for each pending strip... |
1829 |
m_iTimerSlot += QSAMPLER_TIMER_MSECS; |
if (m_changedStrips.count() > 0) { |
|
if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime && m_pWorkspace->isUpdatesEnabled()) { |
|
|
m_iTimerSlot = 0; |
|
|
// Update the channel information for each pending strip... |
|
1830 |
for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first(); |
for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first(); |
1831 |
pChannelStrip; |
pChannelStrip; pChannelStrip = m_changedStrips.next()) { |
|
pChannelStrip = m_changedStrips.next()) { |
|
1832 |
// If successfull, remove from pending list... |
// If successfull, remove from pending list... |
1833 |
if (pChannelStrip->updateChannelInfo()) |
if (pChannelStrip->updateChannelInfo()) |
1834 |
m_changedStrips.remove(pChannelStrip); |
m_changedStrips.remove(pChannelStrip); |
1835 |
} |
} |
1836 |
// Update the channel stream usage for each strip... |
} |
1837 |
QWidgetList wlist = m_pWorkspace->windowList(); |
// Refresh each channel usage, on each period... |
1838 |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
if (m_pOptions->bAutoRefresh) { |
1839 |
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
m_iTimerSlot += QSAMPLER_TIMER_MSECS; |
1840 |
if (pChannelStrip && pChannelStrip->isVisible()) |
if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime) { |
1841 |
pChannelStrip->updateChannelUsage(); |
m_iTimerSlot = 0; |
1842 |
|
// Update the channel stream usage for each strip... |
1843 |
|
QWidgetList wlist = m_pWorkspace->windowList(); |
1844 |
|
for (int iChannel = 0; |
1845 |
|
iChannel < (int) wlist.count(); iChannel++) { |
1846 |
|
qsamplerChannelStrip *pChannelStrip |
1847 |
|
= (qsamplerChannelStrip *) wlist.at(iChannel); |
1848 |
|
if (pChannelStrip && pChannelStrip->isVisible()) |
1849 |
|
pChannelStrip->updateChannelUsage(); |
1850 |
|
} |
1851 |
} |
} |
1852 |
} |
} |
1853 |
} |
} |
2031 |
::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); |
::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); |
2032 |
appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient))); |
appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient))); |
2033 |
|
|
2034 |
|
// Subscribe to channel info change notifications... |
2035 |
|
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK) |
2036 |
|
appendMessagesClient("lscp_client_subscribe"); |
2037 |
|
|
2038 |
// We may stop scheduling around. |
// We may stop scheduling around. |
2039 |
stopSchedule(); |
stopSchedule(); |
2040 |
|
|
2048 |
// if visible, that we're ready... |
// if visible, that we're ready... |
2049 |
if (m_pDeviceForm && m_pDeviceForm->isVisible()) |
if (m_pDeviceForm && m_pDeviceForm->isVisible()) |
2050 |
m_pDeviceForm->setClient(m_pClient); |
m_pDeviceForm->setClient(m_pClient); |
2051 |
|
|
2052 |
// Is any session pending to be loaded? |
// Is any session pending to be loaded? |
2053 |
if (!m_pOptions->sSessionFile.isEmpty()) { |
if (!m_pOptions->sSessionFile.isEmpty()) { |
2054 |
// Just load the prabably startup session... |
// Just load the prabably startup session... |
2090 |
closeSession(false); |
closeSession(false); |
2091 |
|
|
2092 |
// Close us as a client... |
// Close us as a client... |
2093 |
lscp_client_destroy(m_pClient); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO); |
2094 |
|
::lscp_client_destroy(m_pClient); |
2095 |
m_pClient = NULL; |
m_pClient = NULL; |
2096 |
|
|
2097 |
// Log final here. |
// Log final here. |