1 |
// qsamplerMainForm.cpp |
// qsamplerMainForm.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, 2008 Christian Schoenebeck |
Copyright (C) 2007, 2008 Christian Schoenebeck |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
391 |
#else |
#else |
392 |
viewInstrumentsAction->setEnabled(false); |
viewInstrumentsAction->setEnabled(false); |
393 |
#endif |
#endif |
394 |
|
// Setup messages logging appropriately... |
395 |
|
m_pMessages->setLogging( |
396 |
|
m_pOptions->bMessagesLog, |
397 |
|
m_pOptions->sMessagesLogPath); |
398 |
// Set message defaults... |
// Set message defaults... |
399 |
updateMessagesFont(); |
updateMessagesFont(); |
400 |
updateMessagesLimit(); |
updateMessagesLimit(); |
585 |
case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: |
case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: |
586 |
if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); |
if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); |
587 |
break; |
break; |
588 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
589 |
case LSCP_EVENT_CHANNEL_MIDI: { |
case LSCP_EVENT_CHANNEL_MIDI: { |
590 |
const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); |
const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); |
591 |
ChannelStrip *pChannelStrip = channelStrip(iChannelID); |
ChannelStrip *pChannelStrip = channelStrip(iChannelID); |
594 |
break; |
break; |
595 |
} |
} |
596 |
#endif |
#endif |
597 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
598 |
case LSCP_EVENT_DEVICE_MIDI: { |
case LSCP_EVENT_DEVICE_MIDI: { |
599 |
const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); |
const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); |
600 |
const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); |
const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); |
1620 |
int iOldServerTimeout = m_pOptions->iServerTimeout; |
int iOldServerTimeout = m_pOptions->iServerTimeout; |
1621 |
bool bOldServerStart = m_pOptions->bServerStart; |
bool bOldServerStart = m_pOptions->bServerStart; |
1622 |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
1623 |
|
bool bOldMessagesLog = m_pOptions->bMessagesLog; |
1624 |
|
QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; |
1625 |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
1626 |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
1627 |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
1649 |
updateMessagesCapture(); |
updateMessagesCapture(); |
1650 |
} |
} |
1651 |
// Check wheather something immediate has changed. |
// Check wheather something immediate has changed. |
1652 |
|
if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || |
1653 |
|
(!bOldMessagesLog && m_pOptions->bMessagesLog) || |
1654 |
|
(sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) |
1655 |
|
m_pMessages->setLogging( |
1656 |
|
m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); |
1657 |
if (( bOldCompletePath && !m_pOptions->bCompletePath) || |
if (( bOldCompletePath && !m_pOptions->bCompletePath) || |
1658 |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
1659 |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
2732 |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO) != LSCP_OK) |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO) != LSCP_OK) |
2733 |
appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); |
appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); |
2734 |
|
|
2735 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
2736 |
// Subscribe to channel MIDI data notifications... |
// Subscribe to channel MIDI data notifications... |
2737 |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) |
2738 |
appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); |
appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); |
2739 |
#endif |
#endif |
2740 |
|
|
2741 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
2742 |
// Subscribe to channel MIDI data notifications... |
// Subscribe to channel MIDI data notifications... |
2743 |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) |
2744 |
appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); |
appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); |
2796 |
closeSession(false); |
closeSession(false); |
2797 |
|
|
2798 |
// Close us as a client... |
// Close us as a client... |
2799 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
2800 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); |
2801 |
#endif |
#endif |
2802 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
2803 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); |
2804 |
#endif |
#endif |
2805 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); |