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 appropriately... |
395 |
|
m_pMessages->setLogging(m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); |
396 |
// Set message defaults... |
// Set message defaults... |
397 |
updateMessagesFont(); |
updateMessagesFont(); |
398 |
updateMessagesLimit(); |
updateMessagesLimit(); |
583 |
case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: |
case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: |
584 |
if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); |
if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); |
585 |
break; |
break; |
586 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
587 |
case LSCP_EVENT_CHANNEL_MIDI: { |
case LSCP_EVENT_CHANNEL_MIDI: { |
588 |
const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); |
const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); |
589 |
ChannelStrip *pChannelStrip = channelStrip(iChannelID); |
ChannelStrip *pChannelStrip = channelStrip(iChannelID); |
592 |
break; |
break; |
593 |
} |
} |
594 |
#endif |
#endif |
595 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
596 |
case LSCP_EVENT_DEVICE_MIDI: { |
case LSCP_EVENT_DEVICE_MIDI: { |
597 |
const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); |
const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); |
598 |
const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); |
const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); |
1618 |
int iOldServerTimeout = m_pOptions->iServerTimeout; |
int iOldServerTimeout = m_pOptions->iServerTimeout; |
1619 |
bool bOldServerStart = m_pOptions->bServerStart; |
bool bOldServerStart = m_pOptions->bServerStart; |
1620 |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
1621 |
|
bool bOldMessagesLog = m_pOptions->bMessagesLog; |
1622 |
|
QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; |
1623 |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
1624 |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
1625 |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
1647 |
updateMessagesCapture(); |
updateMessagesCapture(); |
1648 |
} |
} |
1649 |
// Check wheather something immediate has changed. |
// Check wheather something immediate has changed. |
1650 |
|
if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || |
1651 |
|
(!bOldMessagesLog && m_pOptions->bMessagesLog) || |
1652 |
|
(sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) |
1653 |
|
m_pMessages->setLogging( |
1654 |
|
m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); |
1655 |
if (( bOldCompletePath && !m_pOptions->bCompletePath) || |
if (( bOldCompletePath && !m_pOptions->bCompletePath) || |
1656 |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
1657 |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
2730 |
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) |
2731 |
appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); |
appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); |
2732 |
|
|
2733 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
2734 |
// Subscribe to channel MIDI data notifications... |
// Subscribe to channel MIDI data notifications... |
2735 |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) |
2736 |
appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); |
appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); |
2737 |
#endif |
#endif |
2738 |
|
|
2739 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
2740 |
// Subscribe to channel MIDI data notifications... |
// Subscribe to channel MIDI data notifications... |
2741 |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) |
if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) |
2742 |
appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); |
appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); |
2794 |
closeSession(false); |
closeSession(false); |
2795 |
|
|
2796 |
// Close us as a client... |
// Close us as a client... |
2797 |
#if CONFIG_LSCP_DEVICE_MIDI |
#if CONFIG_EVENT_DEVICE_MIDI |
2798 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); |
2799 |
#endif |
#endif |
2800 |
#if CONFIG_LSCP_CHANNEL_MIDI |
#if CONFIG_EVENT_CHANNEL_MIDI |
2801 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); |
2802 |
#endif |
#endif |
2803 |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); |
::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); |