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 |
|
|
788 |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; |
789 |
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; |
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; |
790 |
ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; |
ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; |
791 |
|
if (pChannel->channelMute()) |
792 |
|
ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl; |
793 |
|
if (pChannel->channelSolo()) |
794 |
|
ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl; |
795 |
ts << endl; |
ts << endl; |
796 |
} |
} |
797 |
} |
} |
1305 |
sText += tr("LSCP (liblscp) instrument_name support disabled."); |
sText += tr("LSCP (liblscp) instrument_name support disabled."); |
1306 |
sText += "</font></small><br />"; |
sText += "</font></small><br />"; |
1307 |
#endif |
#endif |
1308 |
|
#ifndef CONFIG_MUTE_SOLO |
1309 |
|
sText += "<small><font color=\"red\">"; |
1310 |
|
sText += tr("Sampler channel Mute/Solo support disabled."); |
1311 |
|
sText += "</font></small><br />"; |
1312 |
|
#endif |
1313 |
sText += "<br />\n"; |
sText += "<br />\n"; |
1314 |
sText += tr("Using") + ": "; |
sText += tr("Using") + ": "; |
1315 |
sText += ::lscp_client_package(); |
sText += ::lscp_client_package(); |
1317 |
sText += ::lscp_client_version(); |
sText += ::lscp_client_version(); |
1318 |
#ifdef CONFIG_LIBGIG |
#ifdef CONFIG_LIBGIG |
1319 |
sText += ", "; |
sText += ", "; |
1320 |
sText += gig::libraryName(); |
sText += gig::libraryName().c_str(); |
1321 |
sText += " "; |
sText += " "; |
1322 |
sText += gig::libraryVersion(); |
sText += gig::libraryVersion().c_str(); |
1323 |
#endif |
#endif |
1324 |
sText += "<br />\n"; |
sText += "<br />\n"; |
1325 |
sText += "<br />\n"; |
sText += "<br />\n"; |
1649 |
if (m_pOptions->bMessagesLimit) |
if (m_pOptions->bMessagesLimit) |
1650 |
m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); |
m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); |
1651 |
else |
else |
1652 |
m_pMessages->setMessagesLimit(0); |
m_pMessages->setMessagesLimit(-1); |
1653 |
} |
} |
1654 |
} |
} |
1655 |
|
|
1833 |
} |
} |
1834 |
} |
} |
1835 |
|
|
1836 |
// Refresh each channel usage, on each period... |
if (m_pClient) { |
1837 |
if (m_pClient && (m_changedStrips.count() > 0 || m_pOptions->bAutoRefresh)) { |
// Update the channel information for each pending strip... |
1838 |
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... |
|
1839 |
for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first(); |
for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first(); |
1840 |
pChannelStrip; |
pChannelStrip; pChannelStrip = m_changedStrips.next()) { |
|
pChannelStrip = m_changedStrips.next()) { |
|
1841 |
// If successfull, remove from pending list... |
// If successfull, remove from pending list... |
1842 |
if (pChannelStrip->updateChannelInfo()) |
if (pChannelStrip->updateChannelInfo()) |
1843 |
m_changedStrips.remove(pChannelStrip); |
m_changedStrips.remove(pChannelStrip); |
1844 |
} |
} |
1845 |
// Update the channel stream usage for each strip... |
} |
1846 |
QWidgetList wlist = m_pWorkspace->windowList(); |
// Refresh each channel usage, on each period... |
1847 |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
if (m_pOptions->bAutoRefresh) { |
1848 |
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
m_iTimerSlot += QSAMPLER_TIMER_MSECS; |
1849 |
if (pChannelStrip && pChannelStrip->isVisible()) |
if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime) { |
1850 |
pChannelStrip->updateChannelUsage(); |
m_iTimerSlot = 0; |
1851 |
|
// Update the channel stream usage for each strip... |
1852 |
|
QWidgetList wlist = m_pWorkspace->windowList(); |
1853 |
|
for (int iChannel = 0; |
1854 |
|
iChannel < (int) wlist.count(); iChannel++) { |
1855 |
|
qsamplerChannelStrip *pChannelStrip |
1856 |
|
= (qsamplerChannelStrip *) wlist.at(iChannel); |
1857 |
|
if (pChannelStrip && pChannelStrip->isVisible()) |
1858 |
|
pChannelStrip->updateChannelUsage(); |
1859 |
|
} |
1860 |
} |
} |
1861 |
} |
} |
1862 |
} |
} |
2040 |
::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); |
::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); |
2041 |
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))); |
2042 |
|
|
2043 |
|
// Subscribe to channel info change notifications... |
2044 |
|
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK) |
2045 |
|
appendMessagesClient("lscp_client_subscribe"); |
2046 |
|
|
2047 |
// We may stop scheduling around. |
// We may stop scheduling around. |
2048 |
stopSchedule(); |
stopSchedule(); |
2049 |
|
|
2057 |
// if visible, that we're ready... |
// if visible, that we're ready... |
2058 |
if (m_pDeviceForm && m_pDeviceForm->isVisible()) |
if (m_pDeviceForm && m_pDeviceForm->isVisible()) |
2059 |
m_pDeviceForm->setClient(m_pClient); |
m_pDeviceForm->setClient(m_pClient); |
2060 |
|
|
2061 |
// Is any session pending to be loaded? |
// Is any session pending to be loaded? |
2062 |
if (!m_pOptions->sSessionFile.isEmpty()) { |
if (!m_pOptions->sSessionFile.isEmpty()) { |
2063 |
// Just load the prabably startup session... |
// Just load the prabably startup session... |
2099 |
closeSession(false); |
closeSession(false); |
2100 |
|
|
2101 |
// Close us as a client... |
// Close us as a client... |
2102 |
lscp_client_destroy(m_pClient); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO); |
2103 |
|
::lscp_client_destroy(m_pClient); |
2104 |
m_pClient = NULL; |
m_pClient = NULL; |
2105 |
|
|
2106 |
// Log final here. |
// Log final here. |