qsampler-0.2.2/0000755000175000017500000000000011236104774013224 5ustar alessioalessioqsampler-0.2.2/src/0000755000175000017500000000000011236104755014012 5ustar alessioalessioqsampler-0.2.2/src/qsamplerFxSend.cpp0000644000175000017500000001505710752101751017455 0ustar alessioalessio// qsamplerFxSend.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerFxSend.h" #include "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" namespace QSampler { // marks FxSend objects which don't exist on sampler side yet #define NEW_FX_SEND -1 FxSend::FxSend(int SamplerChannelID, int FxSendID) : m_iSamplerChannelID(SamplerChannelID), m_iFxSendID(FxSendID), m_bDelete(false), m_bModified(false) { m_MidiCtrl = 91; m_Depth = 0.0f; } FxSend::FxSend(int SamplerChannelID) : m_iSamplerChannelID(SamplerChannelID), m_iFxSendID(NEW_FX_SEND), m_bDelete(false), m_bModified(true) { m_MidiCtrl = 91; m_Depth = 0.0f; } FxSend::~FxSend() { } int FxSend::id() const { return m_iFxSendID; } bool FxSend::isNew() const { return m_iFxSendID == NEW_FX_SEND; } void FxSend::setDeletion(bool bDelete) { m_bDelete = bDelete; m_bModified = true; } bool FxSend::deletion() const { return m_bDelete; } void FxSend::setName(const QString& sName) { m_FxSendName = sName; m_bModified = true; } bool FxSend::isModified() const { return m_bModified; } const QString& FxSend::name() const { return m_FxSendName; } void FxSend::setSendDepthMidiCtrl(int iMidiController) { m_MidiCtrl = iMidiController; m_bModified = true; } int FxSend::sendDepthMidiCtrl() const { return m_MidiCtrl; } void FxSend::setCurrentDepth(float depth) { m_Depth = depth; m_bModified = true; } float FxSend::currentDepth() const { return m_Depth; } int FxSend::audioChannel(int iAudioSrc) const { if (iAudioSrc < 0 || iAudioSrc >= m_AudioRouting.size()) return -1; return m_AudioRouting[iAudioSrc]; } bool FxSend::setAudioChannel(int iAudioSrc, int iAudioDst) { if (iAudioSrc < 0 || iAudioSrc >= m_AudioRouting.size()) return false; m_AudioRouting[iAudioSrc] = iAudioDst; m_bModified = true; return true; } const FxSendRoutingMap& FxSend::audioRouting() const { return m_AudioRouting; } bool FxSend::getFromSampler() { #if CONFIG_FXSEND m_bModified = false; // in case this is a new, actually not yet existing FX send, ignore update if (isNew()) return true; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return false; lscp_fxsend_info_t* pFxSendInfo = ::lscp_get_fxsend_info( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID); if (!pFxSendInfo) { pMainForm->appendMessagesClient("lscp_get_fxsend_info"); return false; } m_FxSendName = qsamplerUtilities::lscpEscapedTextToRaw(pFxSendInfo->name); m_MidiCtrl = pFxSendInfo->midi_controller; m_Depth = pFxSendInfo->level; m_AudioRouting.clear(); if (pFxSendInfo->audio_routing) for (int i = 0; pFxSendInfo->audio_routing[i] != -1; ++i) m_AudioRouting[i] = pFxSendInfo->audio_routing[i]; return true; #else // CONFIG_FXSEND return false; #endif // CONFIG_FXSEND } bool FxSend::applyToSampler() { #if CONFIG_FXSEND MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return false; // in case FX send doesn't exist on sampler side yet, create it if (isNew()) { // doesn't exist and scheduled for deletion? nothing to do if (deletion()) { m_bModified = false; return true; } int result = ::lscp_create_fxsend( pMainForm->client(), m_iSamplerChannelID, m_MidiCtrl, NULL ); if (result == -1) { pMainForm->appendMessagesClient("lscp_create_fxsend"); return false; } m_iFxSendID = result; } lscp_status_t result; // delete FX send on sampler side if (deletion()) { result = ::lscp_destroy_fxsend( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_destroy_fxsend"); return false; } m_bModified = false; return true; } // set FX send depth MIDI controller result = ::lscp_set_fxsend_midi_controller( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, m_MidiCtrl ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_midi_controller"); return false; } #if CONFIG_FXSEND_RENAME // set FX send's name result = ::lscp_set_fxsend_name( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, qsamplerUtilities::lscpEscapeText( m_FxSendName ).toUtf8().constData() ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_name"); return false; } #endif // CONFIG_FXSEND_RENAME // set FX send current send level result = ::lscp_set_fxsend_level( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, m_Depth ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_level"); return false; } // set FX send's audio routing for (int i = 0; i < m_AudioRouting.size(); ++i) { result = ::lscp_set_fxsend_audio_channel( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, i, /*audio source*/ m_AudioRouting[i] /*audio destination*/ ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_audio_channel"); return false; } } m_bModified = false; return true; #else // CONFIG_FXSEND return false; #endif // CONFIG_FXSEND } QList FxSend::allFxSendsOfSamplerChannel(int samplerChannelID) { QList sends; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return sends; #ifdef CONFIG_FXSEND int *piSends = ::lscp_list_fxsends(pMainForm->client(), samplerChannelID); if (!piSends) { if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_list_fxsends"); } else { for (int iSend = 0; piSends[iSend] >= 0; ++iSend) sends.append(piSends[iSend]); } #endif // CONFIG_FXSEND return sends; } } // namespace QSampler // end of qsamplerFxSend.cpp qsampler-0.2.2/src/qsamplerMainForm.ui0000644000175000017500000004443711147243071017636 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerMainForm 0 0 800 600 MainWindow :/icons/qsampler.png Qt::Horizontal 4 Qt::Horizontal 4 Qt::Horizontal 4 0 0 800 31 &Edit &View MIDI Device Status &Channels &Help &File Open &Recent :/icons/fileNew.png &New New New session New sampler session Ctrl+N :/icons/fileOpen.png &Open... Open Open session Open sampler session Ctrl+O :/icons/fileSave.png &Save Save Save session Save sampler session Ctrl+S Save &As... Save As Save current sampler session with another name :/icons/fileReset.png Rese&t Reset Reset instance Reset sampler instance Ctrl+R :/icons/fileRestart.png &Restart Restart Restart instance Restart sampler instance Ctrl+Shift+R E&xit Exit Exit this application program :/icons/editAddChannel.png &Add Channel Add Add channel Add a new sampler channel Ctrl+A :/icons/editRemoveChannel.png &Remove Channel Remove Remove channel Remove current sampler channel Ctrl+X :/icons/editResetChannel.png Re&set Channel Reset Reset channel Reset current sampler channel :/icons/editResetAllChannels.png R&eset All Channels Reset All Reset all channels Reset all sampler channels :/icons/editSetupChannel.png &Setup Channel... Setup Setup channel Setup current sampler channel F2 :/icons/editEditChannel.png Ed&it Channel... Edit Edit channel Edit current sampler channel F9 true &Menubar Menubar Show/hide menubar Show/hide the main program window menubar Ctrl+M true &Toolbar viewToolbars Show/hide toolbar Show/hide main program window toolbars Ctrl+T true &Statusbar Statusbar Show/hide statusbar Show/hide the main program window statusbar true M&essages Messages Show/hide messages Show/hide the messages window true :/icons/qsamplerInstrument.png &Instruments Instruments MIDI instruments configuration Show/hide the MIDI instruments configuration window F10 true :/icons/qsamplerDevice.png &Devices Devices Device configuration Show/hide the device configuration window F11 &Options... Options General options Change general application program options F12 false :/icons/channelsArrange.png &Arrange Arrange Arrange channels Line up all channel strips F5 true A&uto Arrange Auto Arrange Auto-arrange channels Auto-arrange channel strips &About... About Show information about this application program About &Qt... About Qt Show information about the Qt toolkit qsampler-0.2.2/src/qsamplerDeviceForm.cpp0000644000175000017500000004617311147243071020315 0ustar alessioalessio// qsamplerDeviceForm.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerDeviceForm.h" #include "qsamplerAbout.h" #include "qsamplerMainForm.h" #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceForm -- Device form implementation. // DeviceForm::DeviceForm ( QWidget *pParent, Qt::WindowFlags wflags ) : QDialog(pParent, wflags) { m_ui.setupUi(this); // Initialize locals. m_iDirtySetup = 0; m_iDirtyCount = 0; m_bNewDevice = false; m_deviceType = Device::None; m_pAudioItems = NULL; m_pMidiItems = NULL; // No exclusive mode as default. m_deviceTypeMode = Device::None; m_ui.DeviceListView->header()->hide(); int iRowHeight = m_ui.DeviceParamTable->fontMetrics().height() + 4; m_ui.DeviceParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.DevicePortParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.DeviceParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.DevicePortParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.DeviceParamTable->setModel(&m_deviceParamModel); m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate); m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); m_ui.DeviceParamTable->verticalHeader()->hide(); m_ui.DevicePortParamTable->setModel(&m_devicePortParamModel); m_ui.DevicePortParamTable->setItemDelegate(&m_devicePortParamDelegate); m_ui.DevicePortParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); m_ui.DevicePortParamTable->verticalHeader()->hide(); // Initial contents. refreshDevices(); // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.DeviceListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(selectDevice())); QObject::connect(m_ui.DeviceListView, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(deviceListViewContextMenu(const QPoint&))); QObject::connect(m_ui.RefreshDevicesPushButton, SIGNAL(clicked()), SLOT(refreshDevices())); QObject::connect(m_ui.DriverNameComboBox, SIGNAL(activated(const QString&)), SLOT(selectDriver(const QString&))); QObject::connect(m_ui.DevicePortComboBox, SIGNAL(activated(int)), SLOT(selectDevicePort(int))); QObject::connect(m_ui.CreateDevicePushButton, SIGNAL(clicked()), SLOT(createDevice())); QObject::connect(m_ui.DeleteDevicePushButton, SIGNAL(clicked()), SLOT(deleteDevice())); QObject::connect(m_ui.ClosePushButton, SIGNAL(clicked()), SLOT(close())); QObject::connect(&m_deviceParamModel, SIGNAL(modelReset()), SLOT(updateCellRenderers())); QObject::connect(&m_deviceParamModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updateCellRenderers(const QModelIndex&, const QModelIndex&))); QObject::connect(&m_devicePortParamModel, SIGNAL(modelReset()), SLOT(updatePortCellRenderers())); QObject::connect(&m_devicePortParamModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updatePortCellRenderers(const QModelIndex&, const QModelIndex&))); } DeviceForm::~DeviceForm (void) { } // Notify our parent that we're emerging. void DeviceForm::showEvent ( QShowEvent *pShowEvent ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); QWidget::showEvent(pShowEvent); refreshDevices(); } // Notify our parent that we're closing. void DeviceForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); // Signal special whether we changed the device set. if (m_iDirtyCount > 0) { m_iDirtyCount = 0; emit devicesChanged(); } } // Set device type spacial exclusive mode. void DeviceForm::setDeviceTypeMode ( Device::DeviceType deviceTypeMode ) { // If it has not changed, do nothing. if (m_deviceTypeMode == deviceTypeMode) return; m_deviceTypeMode = deviceTypeMode; // OK. Do a whole refresh around. refreshDevices(); } // Device driver name setup formal initializer. void DeviceForm::setDriverName ( const QString& sDriverName ) { if (m_ui.DriverNameComboBox->findText(sDriverName) < 0) m_ui.DriverNameComboBox->insertItem(0, sDriverName); m_ui.DriverNameComboBox->setItemText( m_ui.DriverNameComboBox->currentIndex(), sDriverName); } // Set current selected device by type and id. void DeviceForm::setDevice ( Device *pDevice ) { // In case no device is given... Device::DeviceType deviceType = m_deviceTypeMode; if (pDevice) deviceType = pDevice->deviceType(); // Get the device view root item... DeviceItem *pRootItem = NULL; switch (deviceType) { case Device::Audio: pRootItem = m_pAudioItems; break; case Device::Midi: pRootItem = m_pMidiItems; break; case Device::None: break; } // Is the root present? if (pRootItem == NULL) return; // So there's no device huh? if (pDevice == NULL) { m_ui.DeviceListView->setCurrentItem(pRootItem); return; } // For each child, test for identity... for (int i = 0; i < pRootItem->childCount(); i++) { DeviceItem* pDeviceItem = (DeviceItem*) pRootItem->child(i); // If identities match, select as current device item. if (pDeviceItem->device().deviceID() == pDevice->deviceID()) { pDeviceItem->setSelected(true); break; } } } // Create a new device from current table view. void DeviceForm::createDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem *pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; // About a brand new device instance... Device device(((DeviceItem *) pItem)->device()); if (device.createDevice()) { // Now it depends on the device type... DeviceItem *pRootItem = NULL; switch (device.deviceType()) { case Device::Audio: pRootItem = m_pAudioItems; break; case Device::Midi: pRootItem = m_pMidiItems; break; case Device::None: break; } // Append the new device item. DeviceItem *pDeviceItem = new DeviceItem(pRootItem, device.deviceType(), device.deviceID()); // Just make it the new selection... pDeviceItem->setSelected(true); // Main session should be marked dirty. pMainForm->sessionDirty(); m_iDirtyCount++; } } // Delete current device in table view. void DeviceForm::deleteDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Prompt user if this is for real... Options *pOptions = pMainForm->options(); if (pOptions && pOptions->bConfirmRemove) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("About to delete device:\n\n" "%1\n\n" "Are you sure?") .arg(device.deviceName()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; } // Go and destroy... if (device.deleteDevice()) { // Remove it from the device view... delete pItem; // Main session should be marked dirty. pMainForm->sessionDirty(); m_iDirtyCount++; } } // Refresh all device list and views. void DeviceForm::refreshDevices (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; // Avoid nested changes. m_iDirtySetup++; // // (Re)Load complete device configuration data ... // m_pAudioItems = NULL; m_pMidiItems = NULL; m_ui.DeviceListView->clear(); if (pMainForm->client()) { int *piDeviceIDs; // Grab and pop Audio devices... if (m_deviceTypeMode == Device::None || m_deviceTypeMode == Device::Audio) { m_pAudioItems = new DeviceItem(m_ui.DeviceListView, Device::Audio); } if (m_pAudioItems) { piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Audio); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { new DeviceItem(m_pAudioItems, Device::Audio, piDeviceIDs[i]); } m_pAudioItems->setExpanded(true); } // Grab and pop MIDI devices... if (m_deviceTypeMode == Device::None || m_deviceTypeMode == Device::Midi) { m_pMidiItems = new DeviceItem(m_ui.DeviceListView, Device::Midi); } if (m_pMidiItems) { piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Midi); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { new DeviceItem(m_pMidiItems, Device::Midi, piDeviceIDs[i]); } m_pMidiItems->setExpanded(true); } } // Done. m_iDirtySetup--; // Show something. selectDevice(); } // Driver selection slot. void DeviceForm::selectDriver ( const QString& sDriverName ) { if (m_iDirtySetup > 0) return; // // Driver name has changed for a new device... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Driver change is only valid for scratch devices... if (m_bNewDevice) { m_iDirtySetup++; device.setDriver(sDriverName); m_deviceParamModel.refresh(&device, m_bNewDevice); m_iDirtySetup--; // Done. stabilizeForm(); } } // Device selection slot. void DeviceForm::selectDevice () { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (m_iDirtySetup > 0) return; // // Device selection has changed... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) { m_deviceType = Device::None; m_ui.DeviceNameTextLabel->setText(QString::null); m_deviceParamModel.clear(); m_ui.DevicePortComboBox->clear(); m_devicePortParamModel.clear(); m_ui.DevicePortTextLabel->setEnabled(false); m_ui.DevicePortComboBox->setEnabled(false); m_ui.DevicePortParamTable->setEnabled(false); stabilizeForm(); return; } Device& device = ((DeviceItem *) pItem)->device(); m_iDirtySetup++; // Flag whether this is a new device. m_bNewDevice = (device.deviceID() < 0); // Fill the device/driver heading... m_ui.DeviceNameTextLabel->setText(device.deviceName()); // The driver combobox is only rebuilt if device type has changed... if (device.deviceType() != m_deviceType) { m_ui.DriverNameComboBox->clear(); m_ui.DriverNameComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), device.deviceType())); m_deviceType = device.deviceType(); } // Do we need a driver name? if (m_bNewDevice || device.driverName().isEmpty()) device.setDriver(m_ui.DriverNameComboBox->currentText()); setDriverName(device.driverName()); m_ui.DriverNameTextLabel->setEnabled(m_bNewDevice); m_ui.DriverNameComboBox->setEnabled(m_bNewDevice); // Fill the device parameter table... m_deviceParamModel.refresh(&device, m_bNewDevice); // And now the device port/channel parameter table... switch (device.deviceType()) { case Device::Audio: m_ui.DevicePortTextLabel->setText(tr("Ch&annel:")); break; case Device::Midi: m_ui.DevicePortTextLabel->setText(tr("P&ort:")); break; case Device::None: break; } m_ui.DevicePortComboBox->clear(); m_devicePortParamModel.clear(); if (m_bNewDevice) { m_ui.DevicePortTextLabel->setEnabled(false); m_ui.DevicePortComboBox->setEnabled(false); m_ui.DevicePortParamTable->setEnabled(false); } else { QPixmap pixmap; switch (device.deviceType()) { case Device::Audio: pixmap = QPixmap(":/icons/audio2.png"); break; case Device::Midi: pixmap = QPixmap(":/icons/midi2.png"); break; case Device::None: break; } DevicePortList& ports = device.ports(); QListIterator iter(ports); while (iter.hasNext()) { DevicePort *pPort = iter.next(); m_ui.DevicePortComboBox->addItem(pixmap, device.deviceTypeName() + ' ' + device.driverName() + ' ' + pPort->portName()); } bool bEnabled = (ports.count() > 0); m_ui.DevicePortTextLabel->setEnabled(bEnabled); m_ui.DevicePortComboBox->setEnabled(bEnabled); m_ui.DevicePortParamTable->setEnabled(bEnabled); } // Done. m_iDirtySetup--; // Make the device port/channel selection effective. selectDevicePort(m_ui.DevicePortComboBox->currentIndex()); } // Device port/channel selection slot. void DeviceForm::selectDevicePort ( int iPort ) { if (m_iDirtySetup > 0) return; // // Device port/channel selection has changed... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); DevicePort *pPort = NULL; if (iPort >= 0 && iPort < device.ports().count()) pPort = device.ports().at(iPort); if (pPort) { m_iDirtySetup++; m_devicePortParamModel.refresh(pPort, false); m_iDirtySetup--; } // Done. stabilizeForm(); } // Device parameter value change slot. void DeviceForm::changeDeviceParam ( int iRow, int iCol ) { if (m_iDirtySetup > 0) return; if (iRow < 0 || iCol < 0) return; // // Device parameter change... // /* we do that in the model class now ... QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Table 1st column has the parameter name; //const QString sParam = m_ui.DeviceParamTable->text(iRow, 0); //const QString sValue = m_ui.DeviceParamTable->text(iRow, iCol); const QString sParam = m_deviceParamModel.data(m_deviceParamModel.index(iRow, 0), Qt::DisplayRole).value().name; const QString sValue = m_deviceParamModel.data(m_deviceParamModel.index(iRow, iCol), Qt::DisplayRole).value().param.value; // Set the local device parameter value. if (device.setParam(sParam, sValue)) { selectDevice(); } else { stabilizeForm(); } */ // Main session should be dirtier... MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->sessionDirty(); } // Device port/channel parameter value change slot. void DeviceForm::changeDevicePortParam ( int iRow, int iCol ) { if (m_iDirtySetup > 0) return; if (iRow < 0 || iCol < 0) return; // // Device port/channel parameter change... // /* we do that in the model class now ... QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); int iPort = m_ui.DevicePortComboBox->currentIndex(); DevicePort *pPort = NULL; if (iPort >= 0 && iPort < device.ports().count()) pPort = device.ports().at(iPort); if (pPort == NULL) return; // Table 1st column has the parameter name; //const QString sParam = m_ui.DevicePortParamTable->text(iRow, 0); //const QString sValue = m_ui.DevicePortParamTable->text(iRow, iCol); const QString sParam = m_devicePortParamModel.data(m_devicePortParamModel.index(iRow, 0), Qt::DisplayRole).value().name; const QString sValue = m_devicePortParamModel.data(m_devicePortParamModel.index(iRow, iCol), Qt::DisplayRole).value().param.value; // Set the local device port/channel parameter value. pPort->setParam(sParam, sValue); */ // Done. stabilizeForm(); // Main session should be dirtier... MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->sessionDirty(); } // Device list view context menu handler. void DeviceForm::deviceListViewContextMenu ( const QPoint& pos ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem* pItem = m_ui.DeviceListView->itemAt(pos); if (pItem == NULL) return; // Build the device context menu... QMenu menu(this); QAction *pAction; bool bClient = (pMainForm->client() != NULL); bool bEnabled = (pItem != NULL); pAction = menu.addAction( QIcon(":/icons/deviceCreate.png"), tr("&Create device"), this, SLOT(createDevice())); pAction->setEnabled(bEnabled || (bClient && m_bNewDevice)); pAction = menu.addAction( QIcon(":/icons/deviceDelete.png"), tr("&Delete device"), this, SLOT(deleteDevice())); pAction->setEnabled(bEnabled && !m_bNewDevice); menu.addSeparator(); pAction = menu.addAction( QIcon(":/icons/formRefresh.png"), tr("&Refresh"), this, SLOT(refreshDevices())); pAction->setEnabled(bClient); menu.exec(pos); } // Stabilize current form state. void DeviceForm::stabilizeForm (void) { MainForm* pMainForm = MainForm::getInstance(); QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); bool bClient = (pMainForm && pMainForm->client() != NULL); bool bEnabled = (pItem != NULL); m_ui.DeviceNameTextLabel->setEnabled(bEnabled && !m_bNewDevice); m_ui.DriverNameTextLabel->setEnabled(bEnabled && m_bNewDevice); m_ui.DriverNameComboBox->setEnabled(bEnabled && m_bNewDevice); m_ui.DeviceParamTable->setEnabled(bEnabled); m_ui.RefreshDevicesPushButton->setEnabled(bClient); m_ui.CreateDevicePushButton->setEnabled(bEnabled || (bClient && m_bNewDevice)); m_ui.DeleteDevicePushButton->setEnabled(bEnabled && !m_bNewDevice); } void DeviceForm::updateCellRenderers (void) { const int rows = m_deviceParamModel.rowCount(); const int cols = m_deviceParamModel.columnCount(); updateCellRenderers( m_deviceParamModel.index(0, 0), m_deviceParamModel.index(rows - 1, cols - 1)); } void DeviceForm::updateCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_deviceParamModel.index(r, c); m_ui.DeviceParamTable->openPersistentEditor(index); } } } void DeviceForm::updatePortCellRenderers (void) { const int rows = m_devicePortParamModel.rowCount(); const int cols = m_devicePortParamModel.columnCount(); updatePortCellRenderers( m_devicePortParamModel.index(0, 0), m_devicePortParamModel.index(rows - 1, cols - 1)); } void DeviceForm::updatePortCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_devicePortParamModel.index(r, c); m_ui.DevicePortParamTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerDeviceForm.cpp qsampler-0.2.2/src/qsamplerChannelFxForm.cpp0000644000175000017500000002647310756653631021001 0ustar alessioalessio// qsamplerChannelFxForm.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerChannelFxForm.h" #include "qsamplerFxSendsModel.h" // let's not reinvent the wheel for audio routing #include "qsamplerChannel.h" #include #include #include #include #include namespace { // private namespace static const char* _midiControllerName(int iMidiCtrl) { switch (iMidiCtrl) { case 0: return "Bank select MSB"; case 1: return "Modulation MSB"; case 2: return "Breath Controller"; case 4: return "Foot Controller MSB"; case 5: return "Portamento Time MSB"; case 6: return "(N)RPN Data Byte"; case 7: return "Main Volume"; case 8: return "Balance"; case 10: return "Panorama"; case 11: return "Expression"; case 12: return "Effect Control 1"; case 13: return "Effect Control 2"; case 16: return "General Purpose Controller 1"; case 17: return "General Purpose Controller 2"; case 18: return "General Purpose Controller 3"; case 19: return "General Purpose Controller 4"; case 32: return "Bank select LSB"; case 63: return "LSB for Controllers 0?31"; case 64: return "Hold 1"; case 65: return "Portamento"; case 66: return "Sostenuto"; case 67: return "Soft Pedal"; case 68: return "Legato Footswitch"; case 69: return "Hold 2"; case 70: return "Sound Controller 1 (Sound Variation)"; case 71: return "Sound Controller 2 (Harmonic Content)"; case 72: return "Sound Controller 3 (Release Time)"; case 73: return "Sound Controller 4 (Attack Time)"; case 74: return "Sound Controller 5 (Brightness)"; case 75: return "Sound Controller 6"; case 76: return "Sound Controller 7"; case 77: return "Sound Controller 8"; case 78: return "Sound Controller 9"; case 79: return "Sound Controller 10"; case 80: return "General Purpose 5"; case 81: return "General Purpose 6"; case 82: return "General Purpose 7"; case 83: return "General Purpose 8"; case 84: return "Portamento Control"; case 91: return "Effects 1 Depth"; case 92: return "Effects 2 Depth"; case 93: return "Effects 3 Depth"; case 94: return "Effects 4 Depth"; case 95: return "Effects 5 Depth"; case 96: return "Data Increment (N)RPN"; case 97: return "Data Decrement (N)RPN"; case 98: return "NRPN LSB"; case 99: return "NRPN MSB"; case 100: return "RPN LSB"; case 101: return "RPN MSB"; case 120: return "All Sounds Off"; case 121: return "Controller Reset"; case 122: return "Local Control on/off"; case 123: return "All Notes Off"; case 124: return "Omni Off"; case 125: return "Omni On"; case 126: return "Mono On / Poly Off"; case 127: return "Poly On / Mono Off"; default: return ""; } } } // private namespace namespace QSampler { ChannelFxForm::ChannelFxForm ( Channel* pSamplerChannel, QWidget* pParent, Qt::WindowFlags wflags ) : QDialog(pParent, wflags) { m_ui.setupUi(this); m_pSamplerChannel = pSamplerChannel; m_pAudioDevice = NULL; FxSendsModel* pModel = new FxSendsModel(m_pSamplerChannel->channelID(), m_ui.SendsListView); m_ui.SendsListView->setModel(pModel); #if QT_VERSION >= 0x040300 m_ui.SendsListView->setSelectionRectVisible(true); #endif const int iRowHeight = m_ui.audioRoutingTable->fontMetrics().height() + 4; m_ui.audioRoutingTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.audioRoutingTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); ChannelRoutingModel* pRoutingModel = new ChannelRoutingModel(m_ui.audioRoutingTable); m_ui.audioRoutingTable->setModel(pRoutingModel); ChannelRoutingDelegate* pRoutingDelegate = new ChannelRoutingDelegate(m_ui.audioRoutingTable); m_ui.audioRoutingTable->setItemDelegate(pRoutingDelegate); m_ui.audioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); // m_ui.audioRoutingTable->verticalHeader()->hide(); QAbstractButton* pApplyButton = m_ui.buttonBox->button(QDialogButtonBox::Apply); pApplyButton->setEnabled(false); pApplyButton->setIcon(QIcon(":/icons/formEdit.png")); QAbstractButton* pCancelButton = m_ui.buttonBox->button(QDialogButtonBox::Cancel); pCancelButton->setIcon(QIcon(":/icons/formRemove.png")); QAbstractButton* pOkButton = m_ui.buttonBox->button(QDialogButtonBox::Ok); pOkButton->setIcon(QIcon(":/icons/formAccept.png")); QAbstractButton* pResetButton = m_ui.buttonBox->button(QDialogButtonBox::Reset); pResetButton->setEnabled(false); pResetButton->setToolTip("Revert all changes."); m_ui.destroyPushButton->setEnabled(false); m_ui.mainParametersGroupBox->setEnabled(false); m_ui.audioRoutingGroupBox->setEnabled(false); for (int i = 0; i < 128; ++i) { m_ui.depthCtrlComboBox->addItem( QString("[") + QString::number(i) + "] " + _midiControllerName(i) ); } connect( m_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(onButtonClicked(QAbstractButton*)) ); connect( m_ui.createPushButton, SIGNAL(clicked()), this, SLOT(onCreateFxSend()) ); connect( m_ui.destroyPushButton, SIGNAL(clicked()), this, SLOT(onDestroyFxSend()) ); connect( pModel, SIGNAL(fxSendsDirtyChanged(bool)), pApplyButton, SLOT(setEnabled(bool)) ); connect( pModel, SIGNAL(fxSendsDirtyChanged(bool)), pResetButton, SLOT(setEnabled(bool)) ); connect( m_ui.SendsListView, SIGNAL(clicked(const QModelIndex&)), this, SLOT(onFxSendSelection(const QModelIndex&)) ); connect( m_ui.depthCtrlComboBox, SIGNAL(activated(int)), this, SLOT(onDepthCtrlChanged(int)) ); connect( m_ui.depthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onCurrentSendDepthChanged(int)) ); connect( pRoutingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(updateTableCellRenderers(const QModelIndex&, const QModelIndex&)) ); connect( pRoutingModel, SIGNAL(modelReset()), this, SLOT(updateTableCellRenderers()) ); connect( pRoutingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(onRoutingTableChanged()) ); } ChannelFxForm::~ChannelFxForm() { if (m_pAudioDevice) delete m_pAudioDevice; } void ChannelFxForm::onButtonClicked(QAbstractButton* button) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); switch (m_ui.buttonBox->buttonRole(button)) { case QDialogButtonBox::AcceptRole: case QDialogButtonBox::ApplyRole: pModel->applyToSampler(); // force a refresh of the parameter control elements onFxSendSelection(m_ui.SendsListView->currentIndex()); break; case QDialogButtonBox::ResetRole: pModel->cleanRefresh(); // force a refresh of the parameter control elements onFxSendSelection(m_ui.SendsListView->currentIndex()); break; default: // to avoid gcc warnings break; } } void ChannelFxForm::onFxSendSelection(const QModelIndex& index) { const bool bValid = index.isValid(); m_ui.destroyPushButton->setEnabled(bValid); m_ui.mainParametersGroupBox->setEnabled(bValid); m_ui.audioRoutingGroupBox->setEnabled(bValid); FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); FxSend* pFxSend = pModel->fxSend(index); // clear routing model ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); pRoutingModel->refresh(NULL, ChannelRoutingMap()); pRoutingModel->routingMap().clear(); // Reset routing change map. if (m_pAudioDevice) { delete m_pAudioDevice; m_pAudioDevice = NULL; } if (!pFxSend) return; // update routing model if (m_pSamplerChannel->audioDevice() >= 0) { m_pAudioDevice = new Device(Device::Audio, m_pSamplerChannel->audioDevice()); pRoutingModel->refresh(m_pAudioDevice, pFxSend->audioRouting()); } m_ui.depthCtrlComboBox->setCurrentIndex(pFxSend->sendDepthMidiCtrl()); m_ui.depthSpinBox->setValue( int(::round(pFxSend->currentDepth() * 100.0)) ); } void ChannelFxForm::onCreateFxSend() { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); pModel->addFxSend(); } void ChannelFxForm::onDestroyFxSend() { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); pModel->removeFxSend(m_ui.SendsListView->currentIndex()); } void ChannelFxForm::onDepthCtrlChanged(int iMidiCtrl) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) return; pFxSend->setSendDepthMidiCtrl(iMidiCtrl); pModel->onExternalModifiication(index); } void ChannelFxForm::onCurrentSendDepthChanged(int depthPercent) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) return; if (depthPercent == int( ::round(pFxSend->currentDepth() * 100.0) )) return; // nothing changed actually pFxSend->setCurrentDepth(double(depthPercent) / 100.0); pModel->onExternalModifiication(index); } void ChannelFxForm::onRoutingTableChanged() { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); if (pRoutingModel->routingMap().size() <= 0) return; // no changes FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) { pRoutingModel->routingMap().clear(); // reset routing change map return; } ChannelRoutingMap routingMap = pRoutingModel->routingMap(); for ( ChannelRoutingMap::iterator iter = routingMap.begin(); iter != routingMap.end(); ++iter ) pFxSend->setAudioChannel(iter.key(), iter.value()); pRoutingModel->routingMap().clear(); // reset routing change map pModel->onExternalModifiication(index); } void ChannelFxForm::updateTableCellRenderers() { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); const int rows = pRoutingModel->rowCount(); const int cols = pRoutingModel->columnCount(); updateTableCellRenderers( pRoutingModel->index(0, 0), pRoutingModel->index(rows - 1, cols - 1) ); } void ChannelFxForm::updateTableCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = pRoutingModel->index(r, c); m_ui.audioRoutingTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerChannelFxForm.cpp qsampler-0.2.2/src/qsamplerInstrument.cpp0000644000175000017500000001665410725741145020451 0ustar alessioalessio// qsamplerInstrument.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrument.h" #include "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::Instrument - MIDI instrument map structure. // // Constructor. Instrument::Instrument ( int iMap, int iBank, int iProg ) { m_iMap = iMap; m_iBank = iBank; m_iProg = iProg; m_iInstrumentNr = 0; m_fVolume = 1.0f; m_iLoadMode = 0; } // Default destructor. Instrument::~Instrument (void) { } // Instrument accessors. void Instrument::setMap ( int iMap ) { m_iMap = iMap; } int Instrument::map (void) const { return m_iMap; } void Instrument::setBank ( int iBank ) { m_iBank = iBank; } int Instrument::bank (void) const { return m_iBank; } void Instrument::setProg ( int iProg ) { m_iProg = iProg; } int Instrument::prog (void) const { return m_iProg; } void Instrument::setName ( const QString& sName ) { m_sName = sName; } const QString& Instrument::name (void) const { return m_sName; } void Instrument::setEngineName ( const QString& sEngineName ) { m_sEngineName = sEngineName; } const QString& Instrument::engineName (void) const { return m_sEngineName; } void Instrument::setInstrumentFile ( const QString& sInstrumentFile ) { m_sInstrumentFile = sInstrumentFile; } const QString& Instrument::instrumentFile (void) const { return m_sInstrumentFile; } const QString& Instrument::instrumentName (void) const { return m_sInstrumentName; } void Instrument::setInstrumentNr ( int iInstrumentNr ) { m_iInstrumentNr = iInstrumentNr; } int Instrument::instrumentNr (void) const { return m_iInstrumentNr; } void Instrument::setVolume ( float fVolume ) { m_fVolume = fVolume; } float Instrument::volume (void) const { return m_fVolume; } void Instrument::setLoadMode ( int iLoadMode ) { m_iLoadMode = iLoadMode; } int Instrument::loadMode (void) const { return m_iLoadMode; } // Sync methods. bool Instrument::mapInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); lscp_load_mode_t load_mode; switch (m_iLoadMode) { case 3: load_mode = LSCP_LOAD_PERSISTENT; break; case 2: load_mode = LSCP_LOAD_ON_DEMAND_HOLD; break; case 1: load_mode = LSCP_LOAD_ON_DEMAND; break; case 0: default: load_mode = LSCP_LOAD_DEFAULT; break; } if (::lscp_map_midi_instrument(pMainForm->client(), &instr, m_sEngineName.toUtf8().constData(), qsamplerUtilities::lscpEscapePath( m_sInstrumentFile).toUtf8().constData(), m_iInstrumentNr, m_fVolume, load_mode, m_sName.toUtf8().constData()) != LSCP_OK) { pMainForm->appendMessagesClient("lscp_map_midi_instrument"); return false; } return true; #else return false; #endif } bool Instrument::unmapInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); if (::lscp_unmap_midi_instrument(pMainForm->client(), &instr) != LSCP_OK) { pMainForm->appendMessagesClient("lscp_unmap_midi_instrument"); return false; } return true; #else return false; #endif } bool Instrument::getInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); lscp_midi_instrument_info_t *pInstrInfo = ::lscp_get_midi_instrument_info(pMainForm->client(), &instr); if (pInstrInfo == NULL) { pMainForm->appendMessagesClient("lscp_get_midi_instrument_info"); return false; } m_sName = qsamplerUtilities::lscpEscapedTextToRaw(pInstrInfo->name); m_sEngineName = pInstrInfo->engine_name; m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw( pInstrInfo->instrument_name); m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix( pInstrInfo->instrument_file); m_iInstrumentNr = pInstrInfo->instrument_nr; m_fVolume = pInstrInfo->volume; switch (pInstrInfo->load_mode) { case LSCP_LOAD_PERSISTENT: m_iLoadMode = 3; break; case LSCP_LOAD_ON_DEMAND_HOLD: m_iLoadMode = 2; break; case LSCP_LOAD_ON_DEMAND: m_iLoadMode = 1; break; case LSCP_LOAD_DEFAULT: default: m_iLoadMode = 0; break; } // Fix something. if (m_sName.isEmpty()) m_sName = m_sInstrumentName; return true; #else return false; #endif } // Instrument map name enumerator. QStringList Instrument::getMapNames (void) { QStringList maps; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return maps; if (pMainForm->client() == NULL) return maps; #ifdef CONFIG_MIDI_INSTRUMENT int *piMaps = ::lscp_list_midi_instrument_maps(pMainForm->client()); if (piMaps == NULL) { if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_list_midi_instruments"); } else { for (int iMap = 0; piMaps[iMap] >= 0; iMap++) { const QString& sMapName = getMapName(piMaps[iMap]); if (!sMapName.isEmpty()) maps.append(sMapName); } } #endif return maps; } // Instrument map name enumerator. QString Instrument::getMapName ( int iMidiMap ) { QString sMapName; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return sMapName; if (pMainForm->client() == NULL) return sMapName; #ifdef CONFIG_MIDI_INSTRUMENT const char *pszMapName = ::lscp_get_midi_instrument_map_name(pMainForm->client(), iMidiMap); if (pszMapName == NULL) { pszMapName = " -"; if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_get_midi_instrument_name"); } sMapName = QString("%1 - %2").arg(iMidiMap) .arg(qsamplerUtilities::lscpEscapedTextToRaw(pszMapName)); #endif return sMapName; } } // namespace QSampler // end of qsamplerInstrument.cpp qsampler-0.2.2/src/qsamplerOptions.cpp0000644000175000017500000004055011175543442017724 0ustar alessioalessio// qsamplerOptions.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include #ifdef CONFIG_LIBGIG #include #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::Options - Prototype settings structure. // // Constructor. Options::Options (void) : m_settings(QSAMPLER_DOMAIN, QSAMPLER_TITLE) { // Begin into general options group. m_settings.beginGroup("/Options"); // Load server options... m_settings.beginGroup("/Server"); sServerHost = m_settings.value("/ServerHost", "localhost").toString(); iServerPort = m_settings.value("/ServerPort", 8888).toInt(); #if defined(__APPLE__) // Toshi Nagata 20080105 // TODO: Should this be a configure option? iServerTimeout = m_settings.value("/ServerTimeout", 10000).toInt(); #else iServerTimeout = m_settings.value("/ServerTimeout", 1000).toInt(); #endif bServerStart = m_settings.value("/ServerStart", true).toBool(); #if defined(__APPLE__) // Toshi Nagata 20080113 sServerCmdLine = m_settings.value("/ServerCmdLine", "linuxsampler.starter").toString(); #else sServerCmdLine = m_settings.value("/ServerCmdLine", "linuxsampler").toString(); #endif iStartDelay = m_settings.value("/StartDelay", 3).toInt(); m_settings.endGroup(); // Load logging options... m_settings.beginGroup("/Logging"); bMessagesLog = m_settings.value("/MessagesLog", false).toBool(); sMessagesLogPath = m_settings.value("/MessagesLogPath", "qsampler.log").toString(); m_settings.endGroup(); // Load display options... m_settings.beginGroup("/Display"); sDisplayFont = m_settings.value("/DisplayFont").toString(); bDisplayEffect = m_settings.value("/DisplayEffect", true).toBool(); bAutoRefresh = m_settings.value("/AutoRefresh", true).toBool(); iAutoRefreshTime = m_settings.value("/AutoRefreshTime", 1000).toInt(); iMaxVolume = m_settings.value("/MaxVolume", 100).toInt(); sMessagesFont = m_settings.value("/MessagesFont").toString(); bMessagesLimit = m_settings.value("/MessagesLimit", true).toBool(); iMessagesLimitLines = m_settings.value("/MessagesLimitLines", 1000).toInt(); bConfirmRemove = m_settings.value("/ConfirmRemove", true).toBool(); bKeepOnTop = m_settings.value("/KeepOnTop", true).toBool(); bStdoutCapture = m_settings.value("/StdoutCapture", true).toBool(); bCompletePath = m_settings.value("/CompletePath", true).toBool(); iMaxRecentFiles = m_settings.value("/MaxRecentFiles", 5).toInt(); iBaseFontSize = m_settings.value("/BaseFontSize", 0).toInt(); // if libgig provides a fast way to retrieve instrument names even for large // .gig files, then we enable this feature by default #if HAVE_LIBGIG_SETAUTOLOAD bInstrumentNames = m_settings.value("/InstrumentNames", true).toBool(); #else bInstrumentNames = m_settings.value("/InstrumentNames", false).toBool(); #endif m_settings.endGroup(); // And go into view options group. m_settings.beginGroup("/View"); bMenubar = m_settings.value("/Menubar", true).toBool(); bToolbar = m_settings.value("/Toolbar", true).toBool(); bStatusbar = m_settings.value("/Statusbar", true).toBool(); bAutoArrange = m_settings.value("/AutoArrange", true).toBool(); m_settings.endGroup(); m_settings.endGroup(); // Options group. // Recent file list. recentFiles.clear(); m_settings.beginGroup("/RecentFiles"); for (int iFile = 0; iFile < iMaxRecentFiles; iFile++) { QString sFilename = m_settings.value( "/File" + QString::number(iFile + 1)).toString(); if (!sFilename.isEmpty()) recentFiles.append(sFilename); } m_settings.endGroup(); // Sampler fine tuning settings. m_settings.beginGroup("/Tuning"); iMaxVoices = m_settings.value("/MaxVoices", -1).toInt(); iMaxStreams = m_settings.value("/MaxStreams", -1).toInt(); m_settings.endGroup(); // Last but not least, get the default directories. m_settings.beginGroup("/Default"); sSessionDir = m_settings.value("/SessionDir").toString(); sInstrumentDir = m_settings.value("/InstrumentDir").toString(); sEngineName = m_settings.value("/EngineName").toString(); sAudioDriver = m_settings.value("/AudioDriver").toString(); sMidiDriver = m_settings.value("/MidiDriver").toString(); iMidiMap = m_settings.value("/MidiMap", 0).toInt(); iMidiBank = m_settings.value("/MidiBank", 0).toInt(); iMidiProg = m_settings.value("/MidiProg", 0).toInt(); iVolume = m_settings.value("/Volume", 100).toInt(); iLoadMode = m_settings.value("/Loadmode", 0).toInt(); m_settings.endGroup(); } // Default Destructor. Options::~Options (void) { // Make program version available in the future. m_settings.beginGroup("/Program"); m_settings.setValue("/Version", QSAMPLER_VERSION); m_settings.endGroup(); // And go into general options group. m_settings.beginGroup("/Options"); // Save server options. m_settings.beginGroup("/Server"); m_settings.setValue("/ServerHost", sServerHost); m_settings.setValue("/ServerPort", iServerPort); m_settings.setValue("/ServerTimeout", iServerTimeout); m_settings.setValue("/ServerStart", bServerStart); m_settings.setValue("/ServerCmdLine", sServerCmdLine); m_settings.setValue("/StartDelay", iStartDelay); m_settings.endGroup(); // Save logging options... m_settings.beginGroup("/Logging"); m_settings.setValue("/MessagesLog", bMessagesLog); m_settings.setValue("/MessagesLogPath", sMessagesLogPath); m_settings.endGroup(); // Save display options. m_settings.beginGroup("/Display"); m_settings.setValue("/DisplayFont", sDisplayFont); m_settings.setValue("/DisplayEffect", bDisplayEffect); m_settings.setValue("/AutoRefresh", bAutoRefresh); m_settings.setValue("/AutoRefreshTime", iAutoRefreshTime); m_settings.setValue("/MaxVolume", iMaxVolume); m_settings.setValue("/MessagesFont", sMessagesFont); m_settings.setValue("/MessagesLimit", bMessagesLimit); m_settings.setValue("/MessagesLimitLines", iMessagesLimitLines); m_settings.setValue("/ConfirmRemove", bConfirmRemove); m_settings.setValue("/KeepOnTop", bKeepOnTop); m_settings.setValue("/StdoutCapture", bStdoutCapture); m_settings.setValue("/CompletePath", bCompletePath); m_settings.setValue("/MaxRecentFiles", iMaxRecentFiles); m_settings.setValue("/BaseFontSize", iBaseFontSize); m_settings.setValue("/InstrumentNames", bInstrumentNames); m_settings.endGroup(); // View options group. m_settings.beginGroup("/View"); m_settings.setValue("/Menubar", bMenubar); m_settings.setValue("/Toolbar", bToolbar); m_settings.setValue("/Statusbar", bStatusbar); m_settings.setValue("/AutoArrange", bAutoArrange); m_settings.endGroup(); m_settings.endGroup(); // Options group. // Recent file list. int iFile = 0; m_settings.beginGroup("/RecentFiles"); QStringListIterator iter(recentFiles); while (iter.hasNext()) m_settings.setValue("/File" + QString::number(++iFile), iter.next()); m_settings.endGroup(); // Sampler fine tuning settings. m_settings.beginGroup("/Tuning"); if (iMaxVoices > 0) m_settings.setValue("/MaxVoices", iMaxVoices); if (iMaxStreams >= 0) m_settings.setValue("/MaxStreams", iMaxStreams); m_settings.endGroup(); // Default directories. m_settings.beginGroup("/Default"); m_settings.setValue("/SessionDir", sSessionDir); m_settings.setValue("/InstrumentDir", sInstrumentDir); m_settings.setValue("/EngineName", sEngineName); m_settings.setValue("/AudioDriver", sAudioDriver); m_settings.setValue("/MidiDriver", sMidiDriver); m_settings.setValue("/MidiMap", iMidiMap); m_settings.setValue("/MidiBank", iMidiBank); m_settings.setValue("/MidiProg", iMidiProg); m_settings.setValue("/Volume", iVolume); m_settings.setValue("/Loadmode", iLoadMode); m_settings.endGroup(); } //------------------------------------------------------------------------- // Settings accessor. // QSettings& Options::settings (void) { return m_settings; } //------------------------------------------------------------------------- // Command-line argument stuff. // // Help about command line options. void Options::print_usage ( const QString& arg0 ) { QTextStream out(stderr); out << QObject::tr("Usage: %1 [options] [session-file]\n\n" QSAMPLER_TITLE " - " QSAMPLER_SUBTITLE "\n\n" "Options:\n\n" " -s, --start\n\tStart linuxsampler server locally\n\n" " -h, --hostname\n\tSpecify linuxsampler server hostname\n\n" " -p, --port\n\tSpecify linuxsampler server port number\n\n" " -?, --help\n\tShow help about command line options\n\n" " -v, --version\n\tShow version information\n\n") .arg(arg0); } // Parse command line arguments into m_settings. bool Options::parse_args ( const QStringList& args ) { QTextStream out(stderr); const QString sEol = "\n\n"; int iCmdArgs = 0; int argc = args.count(); for (int i = 1; i < argc; i++) { if (iCmdArgs > 0) { sSessionFile += " "; sSessionFile += args.at(i); iCmdArgs++; continue; } QString sArg = args.at(i); QString sVal = QString::null; int iEqual = sArg.indexOf("="); if (iEqual >= 0) { sVal = sArg.right(sArg.length() - iEqual - 1); sArg = sArg.left(iEqual); } else if (i < argc - 1) sVal = args.at(i + 1); if (sArg == "-s" || sArg == "--start") { bServerStart = true; } else if (sArg == "-h" || sArg == "--hostname") { if (sVal.isNull()) { out << QObject::tr("Option -h requires an argument (hostname).") + sEol; return false; } sServerHost = sVal; if (iEqual < 0) i++; } else if (sArg == "-p" || sArg == "--port") { if (sVal.isNull()) { out << QObject::tr("Option -p requires an argument (port).") + sEol; return false; } iServerPort = sVal.toInt(); if (iEqual < 0) i++; } else if (sArg == "-?" || sArg == "--help") { print_usage(args.at(0)); return false; } else if (sArg == "-v" || sArg == "--version") { out << QObject::tr("Qt: %1\n").arg(qVersion()); #ifdef CONFIG_LIBGIG out << QString("%1: %2\n") .arg(gig::libraryName().c_str()) .arg(gig::libraryVersion().c_str()); #endif out << QString("%1: %2\n") .arg(::lscp_client_package()) .arg(::lscp_client_version()); out << QObject::tr(QSAMPLER_TITLE ": %1\n").arg(QSAMPLER_VERSION); return false; } else { // If we don't have one by now, // this will be the startup sesion file... sSessionFile += sArg; iCmdArgs++; } } // Alright with argument parsing. return true; } //--------------------------------------------------------------------------- // Widget geometry persistence helper methods. void Options::loadWidgetGeometry ( QWidget *pWidget ) { // Try to restore old form window positioning. if (pWidget) { QPoint fpos; QSize fsize; bool bVisible; m_settings.beginGroup("/Geometry/" + pWidget->objectName()); fpos.setX(m_settings.value("/x", -1).toInt()); fpos.setY(m_settings.value("/y", -1).toInt()); fsize.setWidth(m_settings.value("/width", -1).toInt()); fsize.setHeight(m_settings.value("/height", -1).toInt()); bVisible = m_settings.value("/visible", false).toBool(); m_settings.endGroup(); if (fpos.x() > 0 && fpos.y() > 0) pWidget->move(fpos); if (fsize.width() > 0 && fsize.height() > 0) pWidget->resize(fsize); else pWidget->adjustSize(); if (bVisible) pWidget->show(); else pWidget->hide(); } } void Options::saveWidgetGeometry ( QWidget *pWidget ) { // Try to save form window position... // (due to X11 window managers ideossincrasies, we better // only save the form geometry while its up and visible) if (pWidget) { m_settings.beginGroup("/Geometry/" + pWidget->objectName()); bool bVisible = pWidget->isVisible(); const QPoint& fpos = pWidget->pos(); const QSize& fsize = pWidget->size(); m_settings.setValue("/x", fpos.x()); m_settings.setValue("/y", fpos.y()); m_settings.setValue("/width", fsize.width()); m_settings.setValue("/height", fsize.height()); m_settings.setValue("/visible", bVisible); m_settings.endGroup(); } } //--------------------------------------------------------------------------- // Combo box history persistence helper implementation. void Options::loadComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { // Load combobox list from configuration settings file... m_settings.beginGroup("/History/" + pComboBox->objectName()); if (m_settings.childKeys().count() > 0) { pComboBox->setUpdatesEnabled(false); pComboBox->setDuplicatesEnabled(false); pComboBox->clear(); for (int i = 0; i < iLimit; i++) { const QString& sText = m_settings.value( "/Item" + QString::number(i + 1)).toString(); if (sText.isEmpty()) break; pComboBox->addItem(sText); } pComboBox->setUpdatesEnabled(true); } m_settings.endGroup(); } void Options::saveComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { // Add current text as latest item... const QString& sCurrentText = pComboBox->currentText(); int iCount = pComboBox->count(); for (int i = 0; i < iCount; i++) { const QString& sText = pComboBox->itemText(i); if (sText == sCurrentText) { pComboBox->removeItem(i); iCount--; break; } } while (iCount >= iLimit) pComboBox->removeItem(--iCount); pComboBox->insertItem(0, sCurrentText); iCount++; // Save combobox list to configuration settings file... m_settings.beginGroup("/History/" + pComboBox->objectName()); for (int i = 0; i < iCount; i++) { const QString& sText = pComboBox->itemText(i); if (sText.isEmpty()) break; m_settings.setValue("/Item" + QString::number(i + 1), sText); } m_settings.endGroup(); } int Options::getMaxVoices() { #ifndef CONFIG_MAX_VOICES return -1; #else if (iMaxVoices > 0) return iMaxVoices; return getEffectiveMaxVoices(); #endif // CONFIG_MAX_VOICES } int Options::getEffectiveMaxVoices() { #ifndef CONFIG_MAX_VOICES return -1; #else MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return -1; return ::lscp_get_voices(pMainForm->client()); #endif // CONFIG_MAX_VOICES } void Options::setMaxVoices(int iMaxVoices) { #ifdef CONFIG_MAX_VOICES if (iMaxVoices < 1) return; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; lscp_status_t result = ::lscp_set_voices(pMainForm->client(), iMaxVoices); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_voices"); return; } this->iMaxVoices = iMaxVoices; #endif // CONFIG_MAX_VOICES } int Options::getMaxStreams() { #ifndef CONFIG_MAX_VOICES return -1; #else if (iMaxStreams > 0) return iMaxStreams; return getEffectiveMaxStreams(); #endif // CONFIG_MAX_VOICES } int Options::getEffectiveMaxStreams() { #ifndef CONFIG_MAX_VOICES return -1; #else MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return -1; return ::lscp_get_streams(pMainForm->client()); #endif // CONFIG_MAX_VOICES } void Options::setMaxStreams(int iMaxStreams) { #ifdef CONFIG_MAX_VOICES if (iMaxStreams < 0) return; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; lscp_status_t result = ::lscp_set_streams(pMainForm->client(), iMaxStreams); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_streams"); return; } this->iMaxStreams = iMaxStreams; #endif // CONFIG_MAX_VOICES } void Options::sendFineTuningSettings() { setMaxVoices(iMaxVoices); setMaxStreams(iMaxStreams); MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; pMainForm->appendMessages(QObject::tr("Sent fine tuning settings.")); } } // namespace QSampler // end of qsamplerOptions.cpp qsampler-0.2.2/src/qsamplerChannelFxForm.h0000644000175000017500000000366310752101751020425 0ustar alessioalessio// qsamplerInstrumentListForm.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerChannelFxForm_h #define __qsamplerChannelFxForm_h #include "ui_qsamplerChannelFxForm.h" #include "qsamplerChannel.h" #include "qsamplerDevice.h" #include namespace QSampler { class ChannelFxForm : public QDialog { Q_OBJECT public: ChannelFxForm(Channel* pSamplerChannel, QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~ChannelFxForm(); protected slots: void onFxSendSelection(const QModelIndex& index); void onButtonClicked(QAbstractButton* button); void onCreateFxSend(); void onDestroyFxSend(); void onDepthCtrlChanged(int iMidiCtrl); void onCurrentSendDepthChanged(int depthPercent); void onRoutingTableChanged(); void updateTableCellRenderers(); void updateTableCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight); private: Ui::qsamplerChannelFxForm m_ui; Channel* m_pSamplerChannel; //int m_SamplerChannelID; Device* m_pAudioDevice; }; } // namespace QSampler #endif // __qsamplerChannelFxForm_h // end of qsamplerChannelFxForm.h qsampler-0.2.2/src/qsamplerUtilities.cpp0000644000175000017500000001654110751717243020250 0ustar alessioalessio// qsamplerUtilities.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include using namespace QSampler; namespace qsamplerUtilities { static int _hexToNumber(char hex_digit) { switch (hex_digit) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': return 10; case 'b': return 11; case 'c': return 12; case 'd': return 13; case 'e': return 14; case 'f': return 15; case 'A': return 10; case 'B': return 11; case 'C': return 12; case 'D': return 13; case 'E': return 14; case 'F': return 15; default: return 0; } } static int _hexsToNumber(char hex_digit0, char hex_digit1) { return _hexToNumber(hex_digit1)*16 + _hexToNumber(hex_digit0); } // returns true if the connected LSCP server supports escape sequences static bool _remoteSupportsEscapeSequences() { const lscpVersion_t version = getRemoteLscpVersion(); // LSCP v1.2 or younger required return (version.major > 1 || (version.major == 1 && version.minor >= 2)); } // converts the given file path into a path as expected by LSCP 1.2 QString lscpEscapePath ( const QString& sPath ) { if (!_remoteSupportsEscapeSequences()) return sPath; QString path(sPath); // replace POSIX path escape sequences (%HH) by LSCP escape sequences (\xHH) // TODO: missing code for other systems like Windows { QRegExp regexp("%[0-9a-fA-F][0-9a-fA-F]"); for (int i = path.indexOf(regexp); i >= 0; i = path.indexOf(regexp, i + 4)) path.replace(i, 1, "\\x"); } // replace POSIX path escape sequence (%%) by its raw character for (int i = path.indexOf("%%"); i >= 0; i = path.indexOf("%%", ++i)) path.remove(i, 1); // replace all non-basic characters by LSCP escape sequences { const char pathSeparator = '/'; QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = 0; i < int(path.length()); i++) { // first skip all previously added LSCP escape sequences if (path.indexOf(regexp, i) == i) { i += 3; continue; } // now match all non-alphanumerics // (we could exclude much more characters here, but that way // we're sure it just works^TM) const char c = path.at(i).toLatin1(); if ( !(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && #if defined(WIN32) !(c == ':') && #endif !(c == pathSeparator) ) { // convert the non-basic character into a LSCP escape sequence char buf[5]; ::snprintf(buf, sizeof(buf), "\\x%02x", static_cast(c)); path.replace(i, 1, buf); i += 3; } } } return path; } // converts a path returned by a LSCP command (and may contain escape // sequences) into the appropriate POSIX path QString lscpEscapedPathToPosix(QString path) { if (!_remoteSupportsEscapeSequences()) return path; // first escape all percent ('%') characters for POSIX for (int i = path.indexOf('%'); i >= 0; i = path.indexOf('%', i+2)) path.replace(i, 1, "%%"); // resolve LSCP hex escape sequences (\xHH) QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = path.indexOf(regexp); i >= 0; i = path.indexOf(regexp, i + 4)) { const QString sHex = path.mid(i+2, 2).toLower(); // the slash has to be escaped for POSIX as well if (sHex == "2f") { path.replace(i, 4, "%2f"); continue; } // all other characters we simply decode char cAscii = _hexsToNumber(sHex.at(1).toLatin1(), sHex.at(0).toLatin1()); path.replace(i, 4, cAscii); } return path; } // converts the given text as expected by LSCP 1.2 // (that is by encoding special characters with LSCP escape sequences) QString lscpEscapeText(const QString& txt) { if (!_remoteSupportsEscapeSequences()) return txt; QString text(txt); // replace all non-basic characters by LSCP escape sequences for (int i = 0; i < int(text.length()); ++i) { // match all non-alphanumerics // (we could exclude much more characters here, but that way // we're sure it just works^TM) const char c = text.at(i).toLatin1(); if ( !(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') ) { // convert the non-basic character into a LSCP escape sequence char buf[5]; ::snprintf(buf, sizeof(buf), "\\x%02x", static_cast(c)); text.replace(i, 1, buf); i += 3; } } return text; } // converts a text returned by a LSCP command and may contain escape // sequences) into raw text, that is with all escape sequences decoded QString lscpEscapedTextToRaw(QString txt) { if (!_remoteSupportsEscapeSequences()) return txt; // resolve LSCP hex escape sequences (\xHH) QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = txt.indexOf(regexp); i >= 0; i = txt.indexOf(regexp, i + 4)) { const QString sHex = txt.mid(i+2, 2).toLower(); // decode into raw ASCII character char cAscii = _hexsToNumber(sHex.at(1).toLatin1(), sHex.at(0).toLatin1()); txt.replace(i, 4, cAscii); } return txt; } lscpVersion_t getRemoteLscpVersion (void) { lscpVersion_t result = { 0, 0 }; MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return result; if (pMainForm->client() == NULL) return result; lscp_server_info_t* pServerInfo = ::lscp_get_server_info(pMainForm->client()); if (pServerInfo && pServerInfo->protocol_version) ::sscanf(pServerInfo->protocol_version, "%d.%d", &result.major, &result.minor); return result; } } // namespace qsamplerUtilities // end of qsamplerUtilities.cpp qsampler-0.2.2/src/qsamplerChannelStrip.h0000644000175000017500000000532010755140476020327 0ustar alessioalessio// qsamplerChannelStrip.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerChannelStrip_h #define __qsamplerChannelStrip_h #include "ui_qsamplerChannelStrip.h" #include "qsamplerChannel.h" #include class QDragEnterEvent; namespace QSampler { //------------------------------------------------------------------------- // QSampler::ChannelStrip -- Channel strip form interface. // class ChannelStrip : public QWidget { Q_OBJECT public: ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~ChannelStrip(); void setup(Channel *pChannel); Channel *channel() const; void setDisplayFont(const QFont& font); QFont displayFont() const; void setDisplayEffect(bool bDisplayEffect); void setMaxVolume(int iMaxVolume); bool updateInstrumentName(bool bForce); bool updateChannelVolume(); bool updateChannelInfo(); bool updateChannelUsage(); void resetErrorCount(); // Channel strip activation/selection. void setSelected(bool bSelected); bool isSelected() const; signals: void channelChanged(ChannelStrip*); public slots: bool channelSetup(); bool channelMute(bool bMute); bool channelSolo(bool bSolo); void channelEdit(); bool channelFxEdit(); bool channelReset(); void volumeChanged(int iVolume); void midiArrived(); protected: void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); void dropEvent(QDropEvent* pDropEvent); void contextMenuEvent(QContextMenuEvent* pEvent); protected slots: void midiDataCeased(); private: Ui::qsamplerChannelStrip m_ui; Channel* m_pChannel; int m_iDirtyChange; int m_iErrorCount; QTimer* pMidiActivityTimer; // Channel strip activation/selection. static ChannelStrip *g_pSelectedStrip; }; } // namespace QSampler #endif // __qsamplerChannelStrip_h // end of qsamplerChannelStrip.h qsampler-0.2.2/src/qsamplerDeviceForm.ui0000644000175000017500000002516011147243071020141 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerDeviceForm 0 0 601 378 Qt::StrongFocus Qsampler: Devices :/icons/qsamplerDevice.png 9 6 7 7 0 0 Qt::Horizontal 4 120 0 Device list false true Devices 7 7 0 0 Qt::Vertical 4 0 6 0 6 75 true Device name false 4 Dri&ver: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false DriverNameComboBox Driver type name true QAbstractItemView::NoSelection false 0 6 0 6 Channel: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false DevicePortComboBox 7 0 0 0 120 0 Device port/channel true QAbstractItemView::NoSelection false 0 4 Refresh device list view &Refresh :/icons/formRefresh.png Alt+R Qt::Horizontal QSizePolicy::Expanding 180 20 Create device &Create :/icons/deviceCreate.png Alt+C Delete device &Delete :/icons/deviceDelete.png Alt+D Close this dialog Close :/icons/formReject.png DeviceListView RefreshDevicesPushButton DriverNameComboBox DevicePortComboBox CreateDevicePushButton DeleteDevicePushButton ClosePushButton qsampler-0.2.2/src/qsamplerChannelFxForm.ui0000644000175000017500000001544110756652366020631 0ustar alessioalessio Christian Schoenebeck Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerChannelFxForm 0 0 518 370 Channel Effects FX Send Selection 0 0 true Qt::Horizontal 40 20 Creates a new FX Send. You have to select 'Apply' afterwards to actually create it on sampler side. Create :/icons/itemNew.png Schedules the selected FX send for deletion. You have to select 'Apply' afterwards to actually destroy it on sampler side. Destroy :/icons/formRemove.png 0 0 FX Send's Parameters Send Depth MIDI Controller: Current Depth: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter % 300 0 0 Audio Routing Qt::Horizontal QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset buttonBox accepted() qsamplerChannelFxForm accept() 248 254 157 274 buttonBox rejected() qsamplerChannelFxForm reject() 316 260 286 274 qsampler-0.2.2/src/qsamplerChannelForm.h0000644000175000017500000000526711147243071020132 0ustar alessioalessio// qsamplerChannelForm.h // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerChannelForm_h #define __qsamplerChannelForm_h #include "ui_qsamplerChannelForm.h" #include "qsamplerDevice.h" #include "qsamplerChannel.h" #include "qsamplerDeviceForm.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::Channelform -- Channel form interface. // class ChannelForm : public QDialog { Q_OBJECT public: ChannelForm(QWidget* pParent = NULL); ~ChannelForm(); void setup(Channel* pChannel); void setupDevice(Device* pDevice, Device::DeviceType deviceTypeMode, const QString& sDriverName); void selectMidiDriverItem(const QString& sMidiDriver); void selectMidiDeviceItem(int iMidiItem); void selectAudioDriverItem(const QString& sAudioDriver); void selectAudioDeviceItem(int iAudioItem); protected slots: void accept(); void reject(); void openInstrumentFile(); void updateInstrumentName(); void selectMidiDriver(const QString& sMidiDriver); void selectMidiDevice(int iMidiItem); void setupMidiDevice(); void selectAudioDriver(const QString& sAudioDriver); void selectAudioDevice(int iAudioItem); void setupAudioDevice(); void updateDevices(); void optionsChanged(); void stabilizeForm(); void updateTableCellRenderers(); void updateTableCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); private: Ui::qsamplerChannelForm m_ui; Channel* m_pChannel; int m_iDirtySetup; int m_iDirtyCount; QList m_audioDevices; QList m_midiDevices; DeviceForm* m_pDeviceForm; ChannelRoutingModel m_routingModel; ChannelRoutingDelegate m_routingDelegate; }; } // namespace QSampler #endif // __qsamplerChannelForm_h // end of qsamplerChannelForm.h qsampler-0.2.2/src/qsamplerFxSend.h0000644000175000017500000000442110751717243017123 0ustar alessioalessio// qsamplerFxSend.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerFxSend_h #define __qsamplerFxSend_h #include #include #include namespace QSampler { // Typedef'd QMap. typedef QMap FxSendRoutingMap; class FxSend { public: // retrieve existing FX send FxSend(int SamplerChannelID, int FxSendID); // create a new FX send FxSend(int SamplerChannelID); ~FxSend(); int id() const; // whether FX send exists on sampler side yet bool isNew() const; // whether scheduled for deletion bool deletion() const; void setDeletion(bool bDelete); bool isModified() const; void setName(const QString& sName); const QString& name() const; void setSendDepthMidiCtrl(int iMidiController); int sendDepthMidiCtrl() const; void setCurrentDepth(float depth); float currentDepth() const; // Audio routing accessors. int audioChannel(int iAudioSrc) const; bool setAudioChannel(int iAudioSrc, int iAudioDst); // The audio routing map itself. const FxSendRoutingMap& audioRouting() const; bool getFromSampler(); bool applyToSampler(); static QList allFxSendsOfSamplerChannel(int samplerChannelID); private: int m_iSamplerChannelID; int m_iFxSendID; bool m_bDelete; bool m_bModified; QString m_FxSendName; int m_MidiCtrl; float m_Depth; FxSendRoutingMap m_AudioRouting; }; } // namespace QSampler #endif // __qsamplerFxSend_h // end of __qsamplerFxSend.h qsampler-0.2.2/src/qsamplerUtilities.h0000644000175000017500000000270410751717243017711 0ustar alessioalessio// qsamplerUtilities.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerUtilities_h #define __qsamplerUtilities_h #include namespace qsamplerUtilities { struct lscpVersion_t { int major; int minor; }; QString lscpEscapePath(const QString& sPath); QString lscpEscapedPathToPosix(QString path); QString lscpEscapeText(const QString& txt); QString lscpEscapedTextToRaw(QString txt); lscpVersion_t getRemoteLscpVersion(); } // namespace qsamplerUtilities #endif // __qsamplerUtilities_h qsampler-0.2.2/src/qsamplerDevice.cpp0000644000175000017500000010143410755636121017467 0ustar alessioalessio// qsamplerDevice.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerDevice.h" #include "qsamplerMainForm.h" #include "qsamplerDeviceForm.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceParam - MIDI/Audio Device parameter structure. // // Constructors. DeviceParam::DeviceParam ( lscp_param_info_t *pParamInfo, const char *pszValue ) { setParam(pParamInfo, pszValue); } // Default destructor. DeviceParam::~DeviceParam (void) { } // Initializer. void DeviceParam::setParam ( lscp_param_info_t *pParamInfo, const char *pszValue ) { if (pParamInfo == NULL) return; // Info structure field members. type = pParamInfo->type; if (pParamInfo->description) description = pParamInfo->description; else description = QString::null; mandatory = (bool) pParamInfo->mandatory; fix = (bool) pParamInfo->fix; multiplicity = (bool) pParamInfo->multiplicity; depends.clear(); for (int i = 0; pParamInfo->depends && pParamInfo->depends[i]; i++) depends.append(pParamInfo->depends[i]); if (pParamInfo->defaultv) defaultv = pParamInfo->defaultv; else defaultv = QString::null; if (pParamInfo->range_min) range_min = pParamInfo->range_min; else range_min = QString::null; if (pParamInfo->range_max) range_max = pParamInfo->range_max; else range_max = QString::null; possibilities.clear(); for (int i = 0; pParamInfo->possibilities && pParamInfo->possibilities[i]; i++) possibilities.append(pParamInfo->possibilities[i]); // The current parameter value. if (pszValue) value = pszValue; else value = QString::null; } //------------------------------------------------------------------------- // QSampler::Device - MIDI/Audio Device structure. // // Constructor. Device::Device ( DeviceType deviceType, int iDeviceID ) { // m_ports.setAutoDelete(true); setDevice(deviceType, iDeviceID); } // Default destructor. Device::~Device (void) { qDeleteAll(m_ports); m_ports.clear(); } // Copy constructor. Device::Device ( const Device& device ) : m_params(device.m_params), m_ports(device.m_ports) { m_iDeviceID = device.m_iDeviceID; m_deviceType = device.m_deviceType; m_sDeviceType = device.m_sDeviceType; m_sDriverName = device.m_sDriverName; m_sDeviceName = device.m_sDeviceName; } // Initializer. void Device::setDevice ( DeviceType deviceType, int iDeviceID ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Device id and type should be always set. m_iDeviceID = iDeviceID; m_deviceType = deviceType; // Reset device parameters and ports anyway. m_params.clear(); qDeleteAll(m_ports); m_ports.clear(); // Retrieve device info, if any. lscp_device_info_t *pDeviceInfo = NULL; switch (deviceType) { case Device::Audio: m_sDeviceType = QObject::tr("Audio"); if (m_iDeviceID >= 0 && (pDeviceInfo = ::lscp_get_audio_device_info( pMainForm->client(), m_iDeviceID)) == NULL) appendMessagesClient("lscp_get_audio_device_info"); break; case Device::Midi: m_sDeviceType = QObject::tr("MIDI"); if (m_iDeviceID >= 0 && (pDeviceInfo = ::lscp_get_midi_device_info( pMainForm->client(), m_iDeviceID)) == NULL) appendMessagesClient("lscp_get_midi_device_info"); break; case Device::None: m_sDeviceType = QString::null; break; } // If we're bogus, bail out... if (pDeviceInfo == NULL) { m_sDriverName = QString::null; m_sDeviceName = QObject::tr("New %1 device").arg(m_sDeviceType); return; } // Other device properties... m_sDriverName = pDeviceInfo->driver; m_sDeviceName = m_sDriverName + ' ' + QObject::tr("Device %1").arg(m_iDeviceID); // Grab device parameters... for (int i = 0; pDeviceInfo->params && pDeviceInfo->params[i].key; i++) { const QString sParam = pDeviceInfo->params[i].key; lscp_param_info_t *pParamInfo = NULL; switch (deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pDeviceInfo->params[i].value); } } // Refresh parameter dependencies... refreshParams(); // Set port/channel list... refreshPorts(); } // Driver name initializer/settler. void Device::setDriver ( const QString& sDriverName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Valid only for scratch devices. if (m_sDriverName == sDriverName) return; // Reset device parameters and ports anyway. m_params.clear(); qDeleteAll(m_ports); m_ports.clear(); // Retrieve driver info, if any. lscp_driver_info_t *pDriverInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pDriverInfo = ::lscp_get_audio_driver_info(pMainForm->client(), sDriverName.toUtf8().constData())) == NULL) appendMessagesClient("lscp_get_audio_driver_info"); break; case Device::Midi: if ((pDriverInfo = ::lscp_get_midi_driver_info(pMainForm->client(), sDriverName.toUtf8().constData())) == NULL) appendMessagesClient("lscp_get_midi_driver_info"); break; case Device::None: break; } // If we're bogus, bail out... if (pDriverInfo == NULL) return; // Remember device parameters... m_sDriverName = sDriverName; // Grab driver parameters... for (int i = 0; pDriverInfo->parameters && pDriverInfo->parameters[i]; i++) { const QString sParam = pDriverInfo->parameters[i]; lscp_param_info_t *pParamInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pParamInfo->defaultv); } } // Refresh parameter dependencies... refreshParams(); // Set port/channel list... refreshPorts(); } // Device property accessors. int Device::deviceID (void) const { return m_iDeviceID; } Device::DeviceType Device::deviceType (void) const { return m_deviceType; } const QString& Device::deviceTypeName (void) const { return m_sDeviceType; } const QString& Device::driverName (void) const { return m_sDriverName; } // Special device name formatter. QString Device::deviceName (void) const { QString sPrefix; if (m_iDeviceID >= 0) sPrefix += m_sDeviceType + ' '; return sPrefix + m_sDeviceName; } // Set the proper device parameter value. bool Device::setParam ( const QString& sParam, const QString& sValue ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Set proper device parameter. m_params[sParam.toUpper()].value = sValue; // If the device already exists, things get immediate... int iRefresh = 0; if (m_iDeviceID >= 0 && sValue != QString::null) { // we need temporary byte arrrays with the final strings, because // i.e. QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QByteArray finalParamKey = sParam.toUtf8(); QByteArray finalParamVal = sValue.toUtf8(); // Prepare parameter struct. lscp_param_t param; param.key = (char *) finalParamKey.constData(); param.value = (char *) finalParamVal.constData(); // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_deviceType) { case Device::Audio: if (sParam == "CHANNELS") iRefresh++; if ((ret = ::lscp_set_audio_device_param(pMainForm->client(), m_iDeviceID, ¶m)) != LSCP_OK) appendMessagesClient("lscp_set_audio_device_param"); break; case Device::Midi: if (sParam == "PORTS") iRefresh++; if ((ret = ::lscp_set_midi_device_param(pMainForm->client(), m_iDeviceID, ¶m)) != LSCP_OK) appendMessagesClient("lscp_set_midi_device_param"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { appendMessages(QString("%1: %2.").arg(sParam).arg(sValue)); // Special care for specific parameter changes... if (iRefresh > 0) iRefresh += refreshPorts(); iRefresh += refreshDepends(sParam); } else { // Oops... appendMessagesError( QObject::tr("Could not set device parameter value.\n\nSorry.")); } } // Return whether we're need a view refresh. return (iRefresh > 0); } // Device parameter accessor. const DeviceParamMap& Device::params (void) const { return m_params; } // Device port/channel list accessor. DevicePortList& Device::ports (void) { return m_ports; } // Create a new device, as a copy of this current one. bool Device::createDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // we need temporary lists with the final strings, because i.e. // QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QList finalKeys; QList finalVals; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) { if (iter.value().value == QString::null) continue; finalKeys.push_back(iter.key().toUtf8()); finalVals.push_back(iter.value().value.toUtf8()); } // yeah, we DO HAVE to do the two loops separately ! // Build the parameter list... lscp_param_t *pParams = new lscp_param_t [finalKeys.count() + 1]; int iParam; for (iParam = 0; iParam < finalKeys.count(); iParam++) { pParams[iParam].key = (char *) finalKeys[iParam].constData(); pParams[iParam].value = (char *) finalVals[iParam].constData(); } // Null terminated. pParams[iParam].key = NULL; pParams[iParam].value = NULL; // Now it depends on the device type... switch (m_deviceType) { case Device::Audio: if ((m_iDeviceID = ::lscp_create_audio_device(pMainForm->client(), m_sDriverName.toUtf8().constData(), pParams)) < 0) appendMessagesClient("lscp_create_audio_device"); break; case Device::Midi: if ((m_iDeviceID = ::lscp_create_midi_device(pMainForm->client(), m_sDriverName.toUtf8().constData(), pParams)) < 0) appendMessagesClient("lscp_create_midi_device"); break; case Device::None: break; } // Free used parameter array. delete pParams; // Show result. if (m_iDeviceID >= 0) { // Refresh our own stuff... setDevice(m_deviceType, m_iDeviceID); appendMessages(QObject::tr("created.")); } else { appendMessagesError(QObject::tr("Could not create device.\n\nSorry.")); } // Return whether we're a valid device... return (m_iDeviceID >= 0); } // Destroy existing device. bool Device::deleteDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_deviceType) { case Device::Audio: if ((ret = ::lscp_destroy_audio_device(pMainForm->client(), m_iDeviceID)) != LSCP_OK) appendMessagesClient("lscp_destroy_audio_device"); break; case Device::Midi: if ((ret = ::lscp_destroy_midi_device(pMainForm->client(), m_iDeviceID)) != LSCP_OK) appendMessagesClient("lscp_destroy_midi_device"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { appendMessages(QObject::tr("deleted.")); m_iDeviceID = -1; } else { appendMessagesError(QObject::tr("Could not delete device.\n\nSorry.")); } // Return whether we've done it.. return (ret == LSCP_OK); } // Device parameter dependencies refreshner. int Device::refreshParams (void) { // This should only make sense for scratch devices... if (m_iDeviceID >= 0) return 0; // Refresh all parameters that have dependencies... int iParams = 0; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) iParams += refreshParam(iter.key()); // Return how many parameters have been refreshed... return iParams; } // Device port/channel list refreshner. int Device::refreshPorts (void) { // This should only make sense for actual devices... if (m_iDeviceID < 0) return 0; // Port/channel count determination... int iPorts = 0; switch (m_deviceType) { case Device::Audio: iPorts = m_params["CHANNELS"].value.toInt(); break; case Device::Midi: iPorts = m_params["PORTS"].value.toInt(); break; case Device::None: break; } // Retrieve port/channel information... qDeleteAll(m_ports); m_ports.clear(); for (int iPort = 0; iPort < iPorts; iPort++) m_ports.append(new DevicePort(*this, iPort)); // Return how many ports have been refreshed... return iPorts; } // Refresh/set dependencies given that some parameter has changed. int Device::refreshDepends ( const QString& sParam ) { // This should only make sense for scratch devices... if (m_iDeviceID >= 0) return 0; // Refresh all parameters that depend on this one... int iDepends = 0; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) { const QStringList& depends = iter.value().depends; if (depends.indexOf(sParam) >= 0) iDepends += refreshParam(iter.key()); } // Return how many dependencies have been refreshed... return iDepends; } // Refresh/set given parameter based on driver supplied dependencies. int Device::refreshParam ( const QString& sParam ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return 0; if (pMainForm->client() == NULL) return 0; // Check if we have dependencies... DeviceParam& param = m_params[sParam.toUpper()]; if (param.depends.isEmpty()) return 0; int iRefresh = 0; // Build dependency list... lscp_param_t *pDepends = new lscp_param_t [param.depends.count() + 1]; int iDepend = 0; // we need temporary lists with the final strings, because i.e. // QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QList finalKeys; QList finalVals; for (int i = 0; i < param.depends.count(); i++) { const QString& sDepend = param.depends[i]; finalKeys.push_back(sDepend.toUtf8()); finalVals.push_back(m_params[sDepend.toUpper()].value.toUtf8()); } // yeah, we DO HAVE to do those two loops separately ! for (int i = 0; i < param.depends.count(); i++) { pDepends[iDepend].key = (char *) finalKeys[i].constData(); pDepends[iDepend].value = (char *) finalVals[i].constData(); ++iDepend; } // Null terminated. pDepends[iDepend].key = NULL; pDepends[iDepend].value = NULL; // FIXME: Some parameter dependencies (e.g.ALSA CARD) // are blocking for no reason, causing potential timeout-crashes. // hopefully this gets mitigated if this dependency hell is only // carried out for scratch devices... // Retrieve some modern parameters... lscp_param_info_t *pParamInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), pDepends)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), pDepends)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { param = DeviceParam(pParamInfo, param.value.isEmpty() ? NULL : param.value.toUtf8().constData()); iRefresh++; } // Free used parameter array. delete pDepends; // Return whether the parameters has been changed... return iRefresh; } // Redirected messages output methods. void Device::appendMessages( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessages(deviceName() + ' ' + s); } void Device::appendMessagesColor( const QString& s, const QString& c ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesColor(deviceName() + ' ' + s, c); } void Device::appendMessagesText( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesText(deviceName() + ' ' + s); } void Device::appendMessagesError( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesError(deviceName() + "\n\n" + s); } void Device::appendMessagesClient( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesClient(deviceName() + ' ' + s); } // Device ids enumerator. int *Device::getDevices ( lscp_client_t *pClient, DeviceType deviceType ) { int *piDeviceIDs = NULL; switch (deviceType) { case Device::Audio: piDeviceIDs = ::lscp_list_audio_devices(pClient); break; case Device::Midi: piDeviceIDs = ::lscp_list_midi_devices(pClient); break; case Device::None: break; } return piDeviceIDs; } std::set Device::getDeviceIDs(lscp_client_t *pClient, DeviceType deviceType) { std::set result; int* piDeviceIDs = getDevices(pClient, deviceType); if (!piDeviceIDs) return result; for (int i = 0; piDeviceIDs[i] != -1; ++i) result.insert(piDeviceIDs[i]); return result; } // Driver names enumerator. QStringList Device::getDrivers ( lscp_client_t *pClient, DeviceType deviceType ) { QStringList drivers; const char **ppszDrivers = NULL; switch (deviceType) { case Device::Audio: ppszDrivers = ::lscp_list_available_audio_drivers(pClient); break; case Device::Midi: ppszDrivers = ::lscp_list_available_midi_drivers(pClient); break; case Device::None: break; } for (int iDriver = 0; ppszDrivers && ppszDrivers[iDriver]; iDriver++) drivers.append(ppszDrivers[iDriver]); return drivers; } //------------------------------------------------------------------------- // QSampler::DevicePort - MIDI/Audio Device port/channel structure. // // Constructor. DevicePort::DevicePort ( Device& device, int iPortID ) : m_device(device) { setDevicePort(iPortID); } // Default destructor. DevicePort::~DevicePort (void) { } // Initializer. void DevicePort::setDevicePort ( int iPortID ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Device port id should be always set. m_iPortID = iPortID; // Reset port parameters anyway. m_params.clear(); // Retrieve device port/channel info, if any. lscp_device_port_info_t *pPortInfo = NULL; switch (m_device.deviceType()) { case Device::Audio: if ((pPortInfo = ::lscp_get_audio_channel_info(pMainForm->client(), m_device.deviceID(), m_iPortID)) == NULL) m_device.appendMessagesClient("lscp_get_audio_channel_info"); break; case Device::Midi: if ((pPortInfo = ::lscp_get_midi_port_info(pMainForm->client(), m_device.deviceID(), m_iPortID)) == NULL) m_device.appendMessagesClient("lscp_get_midi_port_info"); break; case Device::None: break; } // If we're bogus, bail out... if (pPortInfo == NULL) { m_sPortName = QString::null; return; } // Set device port/channel properties... m_sPortName = pPortInfo->name; // Grab device port/channel parameters... m_params.clear(); for (int i = 0; pPortInfo->params && pPortInfo->params[i].key; i++) { const QString sParam = pPortInfo->params[i].key; lscp_param_info_t *pParamInfo = NULL; switch (m_device.deviceType()) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_channel_param_info( pMainForm->client(), m_device.deviceID(), m_iPortID, sParam.toUtf8().constData())) == NULL) m_device.appendMessagesClient("lscp_get_audio_channel_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_port_param_info( pMainForm->client(), m_device.deviceID(), m_iPortID, sParam.toUtf8().constData())) == NULL) m_device.appendMessagesClient("lscp_get_midi_port_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pPortInfo->params[i].value); } } } // Device port/channel property accessors. int DevicePort::portID (void) const { return m_iPortID; } const QString& DevicePort::portName (void) const { return m_sPortName; } // Device port/channel parameter accessor. const DeviceParamMap& DevicePort::params (void) const { return m_params; } // Set the proper device port/channel parameter value. bool DevicePort::setParam ( const QString& sParam, const QString& sValue ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Set proper port/channel parameter. m_params[sParam.toUpper()].value = sValue; // If the device already exists, things get immediate... int iRefresh = 0; if (m_device.deviceID() >= 0 && m_iPortID >= 0) { // we need temporary byte arrrays with the final strings, because // i.e. QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QByteArray finalParamKey = sParam.toUtf8(); QByteArray finalParamVal = sValue.toUtf8(); // Prepare parameter struct. lscp_param_t param; param.key = (char *) finalParamKey.constData(); param.value = (char *) finalParamVal.constData(); // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_device.deviceType()) { case Device::Audio: if ((ret = ::lscp_set_audio_channel_param(pMainForm->client(), m_device.deviceID(), m_iPortID, ¶m)) != LSCP_OK) m_device.appendMessagesClient("lscp_set_audio_channel_param"); break; case Device::Midi: if ((ret = ::lscp_set_midi_port_param(pMainForm->client(), m_device.deviceID(), m_iPortID, ¶m)) != LSCP_OK) m_device.appendMessagesClient("lscp_set_midi_port_param"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { m_device.appendMessages(m_sPortName + ' ' + QString("%1: %2.").arg(sParam).arg(sValue)); iRefresh++; } else { m_device.appendMessagesError( QObject::tr("Could not set %1 parameter value.\n\n" "Sorry.").arg(m_sPortName)); } } // Return whether we're need a view refresh. return (iRefresh > 0); } //------------------------------------------------------------------------- // QSampler::DeviceItem - QTreeWidget device item. // // Constructors. DeviceItem::DeviceItem ( QTreeWidget* pTreeWidget, Device::DeviceType deviceType ) : QTreeWidgetItem(pTreeWidget, QSAMPLER_DEVICE_ITEM), m_device(deviceType) { switch(m_device.deviceType()) { case Device::Audio: setIcon(0, QPixmap(":/icons/audio1.png")); setText(0, QObject::tr("Audio Devices")); break; case Device::Midi: setIcon(0, QPixmap(":/icons/midi1.png")); setText(0, QObject::tr("MIDI Devices")); break; case Device::None: break; } // Root items are not selectable... setFlags(flags() & ~Qt::ItemIsSelectable); } DeviceItem::DeviceItem ( QTreeWidgetItem* pItem, Device::DeviceType deviceType, int iDeviceID ) : QTreeWidgetItem(pItem, QSAMPLER_DEVICE_ITEM), m_device(deviceType, iDeviceID) { switch(m_device.deviceType()) { case Device::Audio: setIcon(0, QPixmap(":/icons/audio2.png")); break; case Device::Midi: setIcon(0, QPixmap(":/icons/midi2.png")); break; case Device::None: break; } setText(0, m_device.deviceName()); } // Default destructor. DeviceItem::~DeviceItem () { } // Instance accessors. Device& DeviceItem::device () { return m_device; } //------------------------------------------------------------------------- // QSampler::AbstractDeviceParamModel - data model base class for device parameters // AbstractDeviceParamModel::AbstractDeviceParamModel ( QObject* pParent ) : QAbstractTableModel(pParent), m_bEditable(false) { m_pParams = NULL; } int AbstractDeviceParamModel::rowCount ( const QModelIndex& /*parent*/) const { //std::cout << "model size=" << params.size() << "\n" << std::flush; return (m_pParams ? m_pParams->size() : 0); } int AbstractDeviceParamModel::columnCount ( const QModelIndex& /*parent*/) const { return 3; } Qt::ItemFlags AbstractDeviceParamModel::flags ( const QModelIndex& /*index*/) const { return Qt::ItemIsEditable | Qt::ItemIsEnabled; } QVariant AbstractDeviceParamModel::headerData ( int section, Qt::Orientation orientation, int role) const { if (role != Qt::DisplayRole) return QVariant(); if (orientation == Qt::Horizontal) { switch (section) { case 0: return tr("Parameter"); case 1: return tr("Value"); case 2: return tr("Description"); default: return QVariant(); } } return QVariant(); } void AbstractDeviceParamModel::refresh ( const DeviceParamMap* pParams, bool bEditable ) { m_pParams = pParams; m_bEditable = bEditable; // inform the outer world (QTableView) that our data changed QAbstractTableModel::reset(); } void AbstractDeviceParamModel::clear (void) { m_pParams = NULL; // inform the outer world (QTableView) that our data changed QAbstractTableModel::reset(); } //------------------------------------------------------------------------- // QSampler::DeviceParamModel - data model for device parameters // (used for QTableView) DeviceParamModel::DeviceParamModel ( QObject *pParent ) : AbstractDeviceParamModel(pParent) { m_pDevice = NULL; } QVariant DeviceParamModel::data ( const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); DeviceParameterRow item; item.name = m_pParams->keys()[index.row()]; item.param = (*m_pParams)[item.name]; item.alive = (m_pDevice && m_pDevice->deviceID() >= 0); return QVariant::fromValue(item); } bool DeviceParamModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; QString key = m_pParams->keys()[index.row()]; //m_pParams[key].value = value.toString(); m_pDevice->setParam(key, value.toString()); emit dataChanged(index, index); return true; } void DeviceParamModel::refresh ( Device* pDevice, bool bEditable ) { m_pDevice = pDevice; AbstractDeviceParamModel::refresh(&pDevice->params(), bEditable); } void DeviceParamModel::clear (void) { AbstractDeviceParamModel::clear(); m_pDevice = NULL; } //------------------------------------------------------------------------- // QSampler::PortParamModel - data model for port parameters // (used for QTableView) PortParamModel::PortParamModel ( QObject *pParent) : AbstractDeviceParamModel(pParent) { m_pPort = NULL; } QVariant PortParamModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); DeviceParameterRow item; item.name = m_pParams->keys()[index.row()]; item.param = (*m_pParams)[item.name]; item.alive = (m_pPort && m_pPort->portID() >= 0); return QVariant::fromValue(item); } bool PortParamModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; QString key = m_pParams->keys()[index.row()]; //params[key].value = value.toString(); m_pPort->setParam(key, value.toString()); emit dataChanged(index, index); return true; } void PortParamModel::refresh ( DevicePort* pPort, bool bEditable ) { m_pPort = pPort; AbstractDeviceParamModel::refresh(&pPort->params(), bEditable); } void PortParamModel::clear (void) { AbstractDeviceParamModel::clear(); m_pPort = NULL; } //------------------------------------------------------------------------- // QSampler::DeviceParamDelegate - table cell renderer for device/port parameters // DeviceParamDelegate::DeviceParamDelegate ( QObject *pParent) : QItemDelegate(pParent) { } QWidget* DeviceParamDelegate::createEditor ( QWidget *pParent, const QStyleOptionViewItem& /* option */, const QModelIndex& index ) const { if (!index.isValid()) return NULL; DeviceParameterRow r = index.model()->data(index, Qt::DisplayRole).value(); const bool bEnabled = (r.alive) ? !r.param.fix : true; QString val = (r.alive) ? r.param.value : r.param.defaultv; switch (index.column()) { case 0: return new QLabel(r.name, pParent); case 1: { if (r.param.type == LSCP_TYPE_BOOL) { QCheckBox *pCheckBox = new QCheckBox(pParent); if (val != QString::null) pCheckBox->setChecked(val.toLower() == "true"); pCheckBox->setEnabled(bEnabled); return pCheckBox; } else if (r.param.possibilities.count() > 0) { QStringList opts = r.param.possibilities; if (r.param.multiplicity) opts.prepend(tr("(none)")); QComboBox *pComboBox = new QComboBox(pParent); pComboBox->addItems(opts); if (r.param.value.isEmpty()) pComboBox->setCurrentIndex(0); else pComboBox->setCurrentIndex(pComboBox->findText(val)); pComboBox->setEnabled(bEnabled); return pComboBox; } else if (r.param.type == LSCP_TYPE_INT && bEnabled) { QSpinBox *pSpinBox = new QSpinBox(pParent); pSpinBox->setMinimum( (!r.param.range_min.isEmpty()) ? r.param.range_min.toInt() : 0 // or better a negative default min value ? ); pSpinBox->setMaximum( (!r.param.range_max.isEmpty()) ? r.param.range_max.toInt() : (1 << 16) // or better a nigher default max value ? ); pSpinBox->setValue(val.toInt()); return pSpinBox; } else if (bEnabled) { QLineEdit *pLineEdit = new QLineEdit(val, pParent); return pLineEdit; } else { QLabel *pLabel = new QLabel(val, pParent); return pLabel; } } case 2: return new QLabel(r.param.description, pParent); default: return NULL; } } void DeviceParamDelegate::setEditorData ( QWidget* /*pEditor*/, const QModelIndex& /*index*/) const { // Unused, since we set the editor data already in createEditor() } void DeviceParamDelegate::setModelData ( QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index ) const { if (index.column() == 1) { DeviceParameterRow r = index.model()->data(index, Qt::DisplayRole).value (); if (pEditor->metaObject()->className() == QString("QCheckBox")) { QCheckBox *pCheckBox = static_cast (pEditor); pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked)); } else if (pEditor->metaObject()->className() == QString("QComboBox")) { QComboBox *pComboBox = static_cast (pEditor); pModel->setData(index, pComboBox->currentText()); } else if (pEditor->metaObject()->className() == QString("QSpinBox")) { QSpinBox *pSpinBox = static_cast (pEditor); pModel->setData(index, pSpinBox->value()); } else if (pEditor->metaObject()->className() == QString("QLineEdit")) { QLineEdit *pLineEdit = static_cast (pEditor); pModel->setData(index, pLineEdit->text()); } else if (pEditor->metaObject()->className() == QString("QLabel")) { QLabel *pLabel = static_cast (pEditor); pModel->setData(index, pLabel->text()); } } } void DeviceParamDelegate::updateEditorGeometry ( QWidget *pEditor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const { if (pEditor) pEditor->setGeometry(option.rect); } } // namespace QSampler // end of qsamplerDevice.cpp qsampler-0.2.2/src/qsamplerMessages.cpp0000644000175000017500000002042511012621551020023 0ustar alessioalessio// qsamplerMessages.cpp // /**************************************************************************** Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerMessages.h" #include #include #include #include #include #include #include #include #include #if !defined(WIN32) #include #endif namespace QSampler { // The default maximum number of message lines. #define QSAMPLER_MESSAGES_MAXLINES 1000 // Notification pipe descriptors #define QSAMPLER_MESSAGES_FDNIL -1 #define QSAMPLER_MESSAGES_FDREAD 0 #define QSAMPLER_MESSAGES_FDWRITE 1 //------------------------------------------------------------------------- // QSampler::Messages - Messages log dockable window. // // Constructor. Messages::Messages ( QWidget *pParent ) : QDockWidget(pParent) { // Surely a name is crucial (e.g.for storing geometry settings) QDockWidget::setObjectName("qsamplerMessages"); // Intialize stdout capture stuff. m_pStdoutNotifier = NULL; m_fdStdout[QSAMPLER_MESSAGES_FDREAD] = QSAMPLER_MESSAGES_FDNIL; m_fdStdout[QSAMPLER_MESSAGES_FDWRITE] = QSAMPLER_MESSAGES_FDNIL; // Create local text view widget. m_pMessagesTextView = new QTextEdit(this); // QFont font(m_pMessagesTextView->font()); // font.setFamily("Fixed"); // m_pMessagesTextView->setFont(font); m_pMessagesTextView->setLineWrapMode(QTextEdit::NoWrap); m_pMessagesTextView->setReadOnly(true); m_pMessagesTextView->setUndoRedoEnabled(false); // m_pMessagesTextView->setTextFormat(Qt::LogText); // Initialize default message limit. m_iMessagesLines = 0; setMessagesLimit(QSAMPLER_MESSAGES_MAXLINES); m_pMessagesLog = NULL; // Prepare the dockable window stuff. QDockWidget::setWidget(m_pMessagesTextView); QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures); QDockWidget::setAllowedAreas( Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea); // Some specialties to this kind of dock window... QDockWidget::setMinimumHeight(120); // Finally set the default caption and tooltip. const QString& sCaption = tr("Messages"); QDockWidget::setWindowTitle(sCaption); // QDockWidget::setWindowIcon(QIcon(":/icons/qsamplerMessages.png")); QDockWidget::setToolTip(sCaption); } // Destructor. Messages::~Messages (void) { // Turn off and close logging. setLogging(false); // No more notifications. if (m_pStdoutNotifier) delete m_pStdoutNotifier; // No need to delete child widgets, Qt does it all for us. } void Messages::showEvent ( QShowEvent *pEvent ) { QDockWidget::showEvent(pEvent); emit visibilityChanged(isVisible()); } // Own stdout/stderr socket notifier slot. void Messages::stdoutNotify ( int fd ) { #if !defined(WIN32) char achBuffer[1024]; int cchBuffer = ::read(fd, achBuffer, sizeof(achBuffer) - 1); if (cchBuffer > 0) { achBuffer[cchBuffer] = (char) 0; appendStdoutBuffer(achBuffer); } #endif } // Stdout buffer handler -- now splitted by complete new-lines... void Messages::appendStdoutBuffer ( const QString& s ) { m_sStdoutBuffer.append(s); int iLength = m_sStdoutBuffer.lastIndexOf('\n'); if (iLength > 0) { QString sTemp = m_sStdoutBuffer.left(iLength); m_sStdoutBuffer.remove(0, iLength + 1); QStringList list = sTemp.split('\n'); QStringListIterator iter(list); while (iter.hasNext()) appendMessagesText(iter.next()); } } // Stdout flusher -- show up any unfinished line... void Messages::flushStdoutBuffer (void) { if (!m_sStdoutBuffer.isEmpty()) { appendMessagesText(m_sStdoutBuffer); m_sStdoutBuffer.truncate(0); } } // Stdout capture accessors. bool Messages::isCaptureEnabled (void) { return (bool) (m_pStdoutNotifier != NULL); } void Messages::setCaptureEnabled ( bool bCapture ) { // Flush current buffer. flushStdoutBuffer(); #if !defined(WIN32) // Destroy if already enabled. if (!bCapture && m_pStdoutNotifier) { delete m_pStdoutNotifier; m_pStdoutNotifier = NULL; // Close the notification pipes. if (m_fdStdout[QSAMPLER_MESSAGES_FDREAD] != QSAMPLER_MESSAGES_FDNIL) { ::close(m_fdStdout[QSAMPLER_MESSAGES_FDREAD]); m_fdStdout[QSAMPLER_MESSAGES_FDREAD] = QSAMPLER_MESSAGES_FDNIL; } if (m_fdStdout[QSAMPLER_MESSAGES_FDREAD] != QSAMPLER_MESSAGES_FDNIL) { ::close(m_fdStdout[QSAMPLER_MESSAGES_FDREAD]); m_fdStdout[QSAMPLER_MESSAGES_FDREAD] = QSAMPLER_MESSAGES_FDNIL; } } // Are we going to make up the capture? if (bCapture && m_pStdoutNotifier == NULL && ::pipe(m_fdStdout) == 0) { ::dup2(m_fdStdout[QSAMPLER_MESSAGES_FDWRITE], STDOUT_FILENO); ::dup2(m_fdStdout[QSAMPLER_MESSAGES_FDWRITE], STDERR_FILENO); m_pStdoutNotifier = new QSocketNotifier( m_fdStdout[QSAMPLER_MESSAGES_FDREAD], QSocketNotifier::Read, this); QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), SLOT(stdoutNotify(int))); } #endif } // Message font accessors. QFont Messages::messagesFont (void) { return m_pMessagesTextView->font(); } void Messages::setMessagesFont ( const QFont& font ) { m_pMessagesTextView->setFont(font); } // Maximum number of message lines accessors. int Messages::messagesLimit (void) { return m_iMessagesLimit; } void Messages::setMessagesLimit ( int iMessagesLimit ) { m_iMessagesLimit = iMessagesLimit; m_iMessagesHigh = iMessagesLimit + (iMessagesLimit / 3); } // Messages logging stuff. bool Messages::isLogging (void) const { return (m_pMessagesLog != NULL); } void Messages::setLogging ( bool bEnabled, const QString& sFilename ) { if (m_pMessagesLog) { appendMessages(tr("Logging stopped --- %1 ---") .arg(QDateTime::currentDateTime().toString())); m_pMessagesLog->close(); delete m_pMessagesLog; m_pMessagesLog = NULL; } if (bEnabled) { m_pMessagesLog = new QFile(sFilename); if (m_pMessagesLog->open(QIODevice::Text | QIODevice::Append)) { appendMessages(tr("Logging started --- %1 ---") .arg(QDateTime::currentDateTime().toString())); } else { delete m_pMessagesLog; m_pMessagesLog = NULL; } } } // Messages log output method. void Messages::appendMessagesLog ( const QString& s ) { if (m_pMessagesLog) { QTextStream(m_pMessagesLog) << s << endl; m_pMessagesLog->flush(); } } // Messages widget output method. void Messages::appendMessagesLine ( const QString& s ) { // Check for message line limit... if (m_iMessagesLines > m_iMessagesHigh) { m_pMessagesTextView->setUpdatesEnabled(false); QTextCursor textCursor(m_pMessagesTextView->document()->begin()); while (m_iMessagesLines > m_iMessagesLimit) { // Move cursor extending selection // from start to next line-block... textCursor.movePosition( QTextCursor::NextBlock, QTextCursor::KeepAnchor); m_iMessagesLines--; } // Remove the excessive line-blocks... textCursor.removeSelectedText(); m_pMessagesTextView->setUpdatesEnabled(true); } m_pMessagesTextView->append(s); m_iMessagesLines++; } // The main utility methods. void Messages::appendMessages ( const QString& s ) { appendMessagesColor(s, "#999999"); } void Messages::appendMessagesColor ( const QString& s, const QString &c ) { QString sText = QTime::currentTime().toString("hh:mm:ss.zzz") + ' ' + s; appendMessagesLine("" + sText + ""); appendMessagesLog(sText); } void Messages::appendMessagesText ( const QString& s ) { appendMessagesLine(s); appendMessagesLog(s); } // History reset. void Messages::clear (void) { m_iMessagesLines = 0; m_pMessagesTextView->clear(); } } // namespace QSampler // end of qsamplerMessages.cpp qsampler-0.2.2/src/qsamplerDevice.h0000644000175000017500000002211710755636121017134 0ustar alessioalessio// qsamplerDevice.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerDevice_h #define __qsamplerDevice_h #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qsamplerOptions.h" namespace QSampler { class DevicePort; // Special QListViewItem::rtti() unique return value. #define QSAMPLER_DEVICE_ITEM 1001 //------------------------------------------------------------------------- // QSampler::DeviceParam - MIDI/Audio Device parameter structure. // class DeviceParam { public: // Constructor. DeviceParam(lscp_param_info_t *pParamInfo = NULL, const char *pszValue = NULL); // Default destructor. ~DeviceParam(); // Initializer. void setParam(lscp_param_info_t *pParamInfo, const char *pszValue = NULL); // Info structure field members. lscp_type_t type; QString description; bool mandatory; bool fix; bool multiplicity; QStringList depends; QString defaultv; QString range_min; QString range_max; QStringList possibilities; // The current parameter value. QString value; }; // Typedef'd parameter QMap. typedef QMap DeviceParamMap; // Typedef'd device port/channels QList. typedef QList DevicePortList; //------------------------------------------------------------------------- // QSampler::Device - MIDI/Audio Device structure. // class Device { public: // We use the same class for MIDI and audio device management enum DeviceType { None, Midi, Audio }; // Constructor. Device(DeviceType deviceType, int iDeviceID = -1); // Copy constructor. Device(const Device& device); // Default destructor. ~Device(); // Initializer. void setDevice(DeviceType deviceType, int iDeviceID = -1); // Driver name initializer. void setDriver(const QString& sDriverName); // Device property accessors. int deviceID() const; DeviceType deviceType() const; const QString& deviceTypeName() const; const QString& driverName() const; // Special device name formatter. QString deviceName() const; // Set the proper device parameter value. bool setParam (const QString& sParam, const QString& sValue); // Device parameters accessor. const DeviceParamMap& params() const; // Device port/channel list accessor. DevicePortList& ports(); // Device parameter dependency list refreshner. int refreshParams(); // Device port/channel list refreshner. int refreshPorts(); // Refresh/set dependencies given that some parameter has changed. int refreshDepends(const QString& sParam); // Create/destroy device methods. bool createDevice(); bool deleteDevice(); // Message logging methods (brainlessly mapped to main form's). void appendMessages (const QString& s) const; void appendMessagesColor (const QString& s, const QString & c) const; void appendMessagesText (const QString& s) const; void appendMessagesError (const QString& s) const; void appendMessagesClient (const QString& s) const; // Device ids enumerator. static int *getDevices(lscp_client_t *pClient, DeviceType deviceType); static std::set getDeviceIDs(lscp_client_t *pClient, DeviceType deviceType); // Driver names enumerator. static QStringList getDrivers(lscp_client_t *pClient, DeviceType deviceType); private: // Refresh/set given parameter based on driver supplied dependencies. int refreshParam(const QString& sParam); // Instance variables. int m_iDeviceID; DeviceType m_deviceType; QString m_sDeviceType; QString m_sDriverName; QString m_sDeviceName; // Device parameter list. DeviceParamMap m_params; // Device port/channel list. DevicePortList m_ports; }; //------------------------------------------------------------------------- // QSampler::DevicePort - MIDI/Audio Device port/channel structure. // class DevicePort { public: // Constructor. DevicePort(Device& device, int iPortID); // Default destructor. ~DevicePort(); // Initializer. void setDevicePort(int iPortID); // Device port property accessors. int portID() const; const QString& portName() const; // Device port parameters accessor. const DeviceParamMap& params() const; // Set the proper device port/channel parameter value. bool setParam (const QString& sParam, const QString& sValue); private: // Device reference. Device& m_device; // Instance variables. int m_iPortID; QString m_sPortName; // Device port parameter list. DeviceParamMap m_params; }; //------------------------------------------------------------------------- // QSampler::DeviceItem - QTreeWidget device item. // class DeviceItem : public QTreeWidgetItem { public: // Constructors. DeviceItem(QTreeWidget *pTreeWidget, Device::DeviceType deviceType); DeviceItem(QTreeWidgetItem *pItem, Device::DeviceType deviceType, int iDeviceID); // Default destructor. ~DeviceItem(); // Instance accessors. Device& device(); private: // Instance variables. Device m_device; }; struct DeviceParameterRow { QString name; DeviceParam param; bool alive; // whether these params refer to an existing device // or for a device that is yet to be created }; //------------------------------------------------------------------------- // QSampler::AbstractDeviceParamModel - data model base class for device parameters // class AbstractDeviceParamModel : public QAbstractTableModel { Q_OBJECT public: AbstractDeviceParamModel(QObject *pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex() ) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex& index) const; virtual void clear(); void refresh(const DeviceParamMap* params, bool bEditable); protected: const DeviceParamMap *m_pParams; bool m_bEditable; }; //------------------------------------------------------------------------- // QSampler::DeviceParamModel - data model for device parameters // (used for QTableView) class DeviceParamModel : public AbstractDeviceParamModel { Q_OBJECT public: DeviceParamModel(QObject *pParent = NULL); // Overridden methods from subclass(es) QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); void clear(); public slots: void refresh(Device* pDevice, bool bEditable); private: Device *m_pDevice; }; //------------------------------------------------------------------------- // QSampler::PortParamModel - data model for port parameters // (used for QTableView) class PortParamModel : public AbstractDeviceParamModel { Q_OBJECT public: PortParamModel(QObject *pParent = 0); // overridden methods from subclass(es) QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); void clear(); public slots: void refresh(DevicePort* pPort, bool bEditable); private: DevicePort* m_pPort; }; //------------------------------------------------------------------------- // QSampler::DeviceParamDelegate - table cell renderer for device/port parameters // class DeviceParamDelegate : public QItemDelegate { Q_OBJECT public: DeviceParamDelegate(QObject *pParent = NULL); QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *pEditor, const QModelIndex& index) const; void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index) const; void updateEditorGeometry(QWidget* pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; } // namespace QSampler // so we can use it i.e. through QVariant Q_DECLARE_METATYPE(QSampler::DeviceParameterRow) #endif // __qsamplerDevice_h // end of qsamplerDevice.h qsampler-0.2.2/src/main.cpp0000644000175000017500000002056611175543442015455 0ustar alessioalessio// main.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include #include #if defined(__APPLE__) // Toshi Nagata 20080105 #include #endif #if QT_VERSION < 0x040300 #define lighter(x) light(x) #define darker(x) dark(x) #endif //------------------------------------------------------------------------- // Singleton application instance stuff (Qt/X11 only atm.) // #if defined(Q_WS_X11) #include #include #include #define QSAMPLER_XUNIQUE "qsamplerMainForm_xunique" #endif class qsamplerApplication : public QApplication { public: // Constructor. qsamplerApplication(int& argc, char **argv) : QApplication(argc, argv), m_pQtTranslator(0), m_pMyTranslator(0), m_pWidget(0) { // Load translation support. QLocale loc; if (loc.language() != QLocale::C) { // Try own Qt translation... m_pQtTranslator = new QTranslator(this); QString sLocName = "qt_" + loc.name(); QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); if (m_pQtTranslator->load(sLocName, sLocPath)) { QApplication::installTranslator(m_pQtTranslator); } else { delete m_pQtTranslator; m_pQtTranslator = 0; #ifdef CONFIG_DEBUG qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", loc.name().toUtf8().constData(), sLocPath.toUtf8().constData(), sLocName.toUtf8().constData()); #endif } // Try own application translation... m_pMyTranslator = new QTranslator(this); sLocName = "qsampler_" + loc.name(); if (m_pMyTranslator->load(sLocName, sLocPath)) { QApplication::installTranslator(m_pMyTranslator); } else { sLocPath = CONFIG_PREFIX "/share/locale"; if (m_pMyTranslator->load(sLocName, sLocPath)) { QApplication::installTranslator(m_pMyTranslator); } else { delete m_pMyTranslator; m_pMyTranslator = 0; #ifdef CONFIG_DEBUG qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", loc.name().toUtf8().constData(), sLocPath.toUtf8().constData(), sLocName.toUtf8().constData()); #endif } } } #if defined(Q_WS_X11) m_pDisplay = QX11Info::display(); m_aUnique = XInternAtom(m_pDisplay, QSAMPLER_XUNIQUE, false); XGrabServer(m_pDisplay); m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); XUngrabServer(m_pDisplay); #endif } // Destructor. ~qsamplerApplication() { if (m_pMyTranslator) delete m_pMyTranslator; if (m_pQtTranslator) delete m_pQtTranslator; } // Main application widget accessors. void setMainWidget(QWidget *pWidget) { m_pWidget = pWidget; #if defined(Q_WS_X11) XGrabServer(m_pDisplay); m_wOwner = m_pWidget->winId(); XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); XUngrabServer(m_pDisplay); #endif } QWidget *mainWidget() const { return m_pWidget; } // Check if another instance is running, // and raise its proper main widget... bool setup() { #if defined(Q_WS_X11) if (m_wOwner != None) { // First, notify any freedesktop.org WM // that we're about to show the main widget... Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay); int iScreen = XScreenNumberOfScreen(pScreen); XEvent ev; memset(&ev, 0, sizeof(ev)); ev.xclient.type = ClientMessage; ev.xclient.display = m_pDisplay; ev.xclient.window = m_wOwner; ev.xclient.message_type = XInternAtom(m_pDisplay, "_NET_ACTIVE_WINDOW", false); ev.xclient.format = 32; ev.xclient.data.l[0] = 0; // Source indication. ev.xclient.data.l[1] = 0; // Timestamp. ev.xclient.data.l[2] = 0; // Requestor's currently active window (none) ev.xclient.data.l[3] = 0; ev.xclient.data.l[4] = 0; XSelectInput(m_pDisplay, m_wOwner, StructureNotifyMask); XSendEvent(m_pDisplay, RootWindow(m_pDisplay, iScreen), false, (SubstructureNotifyMask | SubstructureRedirectMask), &ev); XSync(m_pDisplay, false); XRaiseWindow(m_pDisplay, m_wOwner); // And then, let it get caught on destination // by QApplication::x11EventFilter... QByteArray value = QSAMPLER_XUNIQUE; XChangeProperty( m_pDisplay, m_wOwner, m_aUnique, m_aUnique, 8, PropModeReplace, (unsigned char *) value.data(), value.length()); // Done. return true; } #endif return false; } #if defined(Q_WS_X11) bool x11EventFilter(XEvent *pEv) { if (m_pWidget && m_wOwner != None && pEv->type == PropertyNotify && pEv->xproperty.window == m_wOwner && pEv->xproperty.state == PropertyNewValue) { // Always check whether our property-flag is still around... Atom aType; int iFormat = 0; unsigned long iItems = 0; unsigned long iAfter = 0; unsigned char *pData = 0; if (XGetWindowProperty( m_pDisplay, m_wOwner, m_aUnique, 0, 1024, false, m_aUnique, &aType, &iFormat, &iItems, &iAfter, &pData) == Success && aType == m_aUnique && iItems > 0 && iAfter == 0) { // Avoid repeating it-self... XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); // Just make it always shows up fine... m_pWidget->show(); m_pWidget->raise(); m_pWidget->activateWindow(); } // Free any left-overs... if (iItems > 0 && pData) XFree(pData); } return QApplication::x11EventFilter(pEv); } #endif private: // Translation support. QTranslator *m_pQtTranslator; QTranslator *m_pMyTranslator; // Instance variables. QWidget *m_pWidget; #if defined(Q_WS_X11) Display *m_pDisplay; Atom m_aUnique; Window m_wOwner; #endif }; //------------------------------------------------------------------------- // main - The main program trunk. // int main ( int argc, char **argv ) { Q_INIT_RESOURCE(qsampler); qsamplerApplication app(argc, argv); #if defined(__APPLE__) // Toshi Nagata 20080105 { // Set the plugin path to @exetutable_path/../plugins QDir dir(QApplication::applicationDirPath()); dir.cdUp(); // "Contents" directory QApplication::setLibraryPaths(QStringList(dir.absolutePath() + "/plugins")); // Set the PATH environment variable to include @executable_path/../../.. dir.cdUp(); dir.cdUp(); QString path(getenv("PATH")); path = dir.absolutePath() + ":" + path; setenv("PATH", path.toUtf8().constData(), 1); } #endif // Construct default settings; override with command line arguments. QSampler::Options options; if (!options.parse_args(app.arguments())) { app.quit(); return 1; } // Have another instance running? if (app.setup()) { app.quit(); return 2; } // Dark themes grayed/disabled color group fix... QPalette pal(app.palette()); if (pal.base().color().value() < 0x7f) { pal.setColorGroup(QPalette::Disabled, pal.windowText().color().darker(), pal.button(), pal.light(), pal.dark(), pal.mid(), pal.text().color().darker(), pal.text().color().lighter(), pal.base(), pal.window()); app.setPalette(pal); } // Set default base font... int iBaseFontSize = app.font().pointSize(); if (options.iBaseFontSize > 0) iBaseFontSize = options.iBaseFontSize; app.setFont(QFont(app.font().family(), iBaseFontSize)); // Construct, setup and show the main form. QSampler::MainForm w; w.setup(&options); w.show(); // Settle this one as application main widget... app.setMainWidget(&w); // Register the quit signal/slot. // app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); return app.exec(); } // end of main.cpp qsampler-0.2.2/src/qsamplerMainForm.cpp0000644000175000017500000023622711175543442020011 0ustar alessioalessio// qsamplerMainForm.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerMainForm.h" #include "qsamplerOptions.h" #include "qsamplerChannel.h" #include "qsamplerMessages.h" #include "qsamplerChannelStrip.h" #include "qsamplerInstrumentList.h" #include "qsamplerInstrumentListForm.h" #include "qsamplerDeviceForm.h" #include "qsamplerOptionsForm.h" #include "qsamplerDeviceStatusForm.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SIGNAL_H #include #endif #ifdef CONFIG_LIBGIG #include #endif // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif // All winsock apps needs this. #if defined(WIN32) static WSADATA _wsaData; #endif namespace QSampler { // Timer constant stuff. #define QSAMPLER_TIMER_MSECS 200 // Status bar item indexes #define QSAMPLER_STATUS_CLIENT 0 // Client connection state. #define QSAMPLER_STATUS_SERVER 1 // Currenr server address (host:port) #define QSAMPLER_STATUS_CHANNEL 2 // Active channel caption. #define QSAMPLER_STATUS_SESSION 3 // Current session modification state. //------------------------------------------------------------------------- // CustomEvent -- specialty for callback comunication. #define QSAMPLER_CUSTOM_EVENT QEvent::Type(QEvent::User + 0) class CustomEvent : public QEvent { public: // Constructor. CustomEvent(lscp_event_t event, const char *pchData, int cchData) : QEvent(QSAMPLER_CUSTOM_EVENT) { m_event = event; m_data = QString::fromUtf8(pchData, cchData); } // Accessors. lscp_event_t event() { return m_event; } QString& data() { return m_data; } private: // The proper event type. lscp_event_t m_event; // The event data as a string. QString m_data; }; //------------------------------------------------------------------------- // qsamplerMainForm -- Main window form implementation. // Kind of singleton reference. MainForm* MainForm::g_pMainForm = NULL; MainForm::MainForm ( QWidget *pParent ) : QMainWindow(pParent) { m_ui.setupUi(this); // Pseudo-singleton reference setup. g_pMainForm = this; // Initialize some pointer references. m_pOptions = NULL; // All child forms are to be created later, not earlier than setup. m_pMessages = NULL; m_pInstrumentListForm = NULL; m_pDeviceForm = NULL; // We'll start clean. m_iUntitled = 0; m_iDirtyCount = 0; m_pServer = NULL; m_pClient = NULL; m_iStartDelay = 0; m_iTimerDelay = 0; m_iTimerSlot = 0; #ifdef HAVE_SIGNAL_H // Set to ignore any fatal "Broken pipe" signals. ::signal(SIGPIPE, SIG_IGN); #endif #ifdef CONFIG_VOLUME // Make some extras into the toolbar... const QString& sVolumeText = tr("Master volume"); m_iVolumeChanging = 0; // Volume slider... m_ui.channelsToolbar->addSeparator(); m_pVolumeSlider = new QSlider(Qt::Horizontal, m_ui.channelsToolbar); m_pVolumeSlider->setTickPosition(QSlider::TicksBothSides); m_pVolumeSlider->setTickInterval(10); m_pVolumeSlider->setPageStep(10); m_pVolumeSlider->setSingleStep(10); m_pVolumeSlider->setMinimum(0); m_pVolumeSlider->setMaximum(100); m_pVolumeSlider->setMaximumHeight(26); m_pVolumeSlider->setMinimumWidth(160); m_pVolumeSlider->setToolTip(sVolumeText); QObject::connect(m_pVolumeSlider, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); //m_ui.channelsToolbar->setHorizontallyStretchable(true); //m_ui.channelsToolbar->setStretchableWidget(m_pVolumeSlider); m_ui.channelsToolbar->addWidget(m_pVolumeSlider); // Volume spin-box m_ui.channelsToolbar->addSeparator(); m_pVolumeSpinBox = new QSpinBox(m_ui.channelsToolbar); m_pVolumeSpinBox->setMaximumHeight(24); m_pVolumeSpinBox->setSuffix(" %"); m_pVolumeSpinBox->setMinimum(0); m_pVolumeSpinBox->setMaximum(100); m_pVolumeSpinBox->setToolTip(sVolumeText); QObject::connect(m_pVolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); m_ui.channelsToolbar->addWidget(m_pVolumeSpinBox); #endif // Make it an MDI workspace. m_pWorkspace = new QWorkspace(this); m_pWorkspace->setScrollBarsEnabled(true); // Set the activation connection. QObject::connect(m_pWorkspace, SIGNAL(windowActivated(QWidget *)), SLOT(activateStrip(QWidget *))); // Make it shine :-) setCentralWidget(m_pWorkspace); // Create some statusbar labels... QLabel *pLabel; // Client status. pLabel = new QLabel(tr("Connected"), this); pLabel->setAlignment(Qt::AlignLeft); pLabel->setMinimumSize(pLabel->sizeHint()); m_statusItem[QSAMPLER_STATUS_CLIENT] = pLabel; statusBar()->addWidget(pLabel); // Server address. pLabel = new QLabel(this); pLabel->setAlignment(Qt::AlignLeft); m_statusItem[QSAMPLER_STATUS_SERVER] = pLabel; statusBar()->addWidget(pLabel, 1); // Channel title. pLabel = new QLabel(this); pLabel->setAlignment(Qt::AlignLeft); m_statusItem[QSAMPLER_STATUS_CHANNEL] = pLabel; statusBar()->addWidget(pLabel, 2); // Session modification status. pLabel = new QLabel(tr("MOD"), this); pLabel->setAlignment(Qt::AlignHCenter); pLabel->setMinimumSize(pLabel->sizeHint()); m_statusItem[QSAMPLER_STATUS_SESSION] = pLabel; statusBar()->addWidget(pLabel); #if defined(WIN32) WSAStartup(MAKEWORD(1, 1), &_wsaData); #endif // Some actions surely need those // shortcuts firmly attached... addAction(m_ui.viewMenubarAction); addAction(m_ui.viewToolbarAction); QObject::connect(m_ui.fileNewAction, SIGNAL(triggered()), SLOT(fileNew())); QObject::connect(m_ui.fileOpenAction, SIGNAL(triggered()), SLOT(fileOpen())); QObject::connect(m_ui.fileSaveAction, SIGNAL(triggered()), SLOT(fileSave())); QObject::connect(m_ui.fileSaveAsAction, SIGNAL(triggered()), SLOT(fileSaveAs())); QObject::connect(m_ui.fileResetAction, SIGNAL(triggered()), SLOT(fileReset())); QObject::connect(m_ui.fileRestartAction, SIGNAL(triggered()), SLOT(fileRestart())); QObject::connect(m_ui.fileExitAction, SIGNAL(triggered()), SLOT(fileExit())); QObject::connect(m_ui.editAddChannelAction, SIGNAL(triggered()), SLOT(editAddChannel())); QObject::connect(m_ui.editRemoveChannelAction, SIGNAL(triggered()), SLOT(editRemoveChannel())); QObject::connect(m_ui.editSetupChannelAction, SIGNAL(triggered()), SLOT(editSetupChannel())); QObject::connect(m_ui.editEditChannelAction, SIGNAL(triggered()), SLOT(editEditChannel())); QObject::connect(m_ui.editResetChannelAction, SIGNAL(triggered()), SLOT(editResetChannel())); QObject::connect(m_ui.editResetAllChannelsAction, SIGNAL(triggered()), SLOT(editResetAllChannels())); QObject::connect(m_ui.viewMenubarAction, SIGNAL(toggled(bool)), SLOT(viewMenubar(bool))); QObject::connect(m_ui.viewToolbarAction, SIGNAL(toggled(bool)), SLOT(viewToolbar(bool))); QObject::connect(m_ui.viewStatusbarAction, SIGNAL(toggled(bool)), SLOT(viewStatusbar(bool))); QObject::connect(m_ui.viewMessagesAction, SIGNAL(toggled(bool)), SLOT(viewMessages(bool))); QObject::connect(m_ui.viewInstrumentsAction, SIGNAL(triggered()), SLOT(viewInstruments())); QObject::connect(m_ui.viewDevicesAction, SIGNAL(triggered()), SLOT(viewDevices())); QObject::connect(m_ui.viewOptionsAction, SIGNAL(triggered()), SLOT(viewOptions())); QObject::connect(m_ui.channelsArrangeAction, SIGNAL(triggered()), SLOT(channelsArrange())); QObject::connect(m_ui.channelsAutoArrangeAction, SIGNAL(toggled(bool)), SLOT(channelsAutoArrange(bool))); QObject::connect(m_ui.helpAboutAction, SIGNAL(triggered()), SLOT(helpAbout())); QObject::connect(m_ui.helpAboutQtAction, SIGNAL(triggered()), SLOT(helpAboutQt())); QObject::connect(m_ui.fileMenu, SIGNAL(aboutToShow()), SLOT(updateRecentFilesMenu())); QObject::connect(m_ui.channelsMenu, SIGNAL(aboutToShow()), SLOT(channelsMenuAboutToShow())); } // Destructor. MainForm::~MainForm() { // Do final processing anyway. processServerExit(); #if defined(WIN32) WSACleanup(); #endif // Finally drop any widgets around... if (m_pDeviceForm) delete m_pDeviceForm; if (m_pInstrumentListForm) delete m_pInstrumentListForm; if (m_pMessages) delete m_pMessages; if (m_pWorkspace) delete m_pWorkspace; // Delete status item labels one by one. if (m_statusItem[QSAMPLER_STATUS_CLIENT]) delete m_statusItem[QSAMPLER_STATUS_CLIENT]; if (m_statusItem[QSAMPLER_STATUS_SERVER]) delete m_statusItem[QSAMPLER_STATUS_SERVER]; if (m_statusItem[QSAMPLER_STATUS_CHANNEL]) delete m_statusItem[QSAMPLER_STATUS_CHANNEL]; if (m_statusItem[QSAMPLER_STATUS_SESSION]) delete m_statusItem[QSAMPLER_STATUS_SESSION]; #ifdef CONFIG_VOLUME delete m_pVolumeSpinBox; delete m_pVolumeSlider; #endif // Pseudo-singleton reference shut-down. g_pMainForm = NULL; } // Make and set a proper setup options step. void MainForm::setup ( Options *pOptions ) { // We got options? m_pOptions = pOptions; // What style do we create these forms? Qt::WindowFlags wflags = Qt::Window #if QT_VERSION >= 0x040200 | Qt::CustomizeWindowHint #endif | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint; if (m_pOptions->bKeepOnTop) wflags |= Qt::Tool; // Some child forms are to be created right now. m_pMessages = new Messages(this); m_pDeviceForm = new DeviceForm(this, wflags); #ifdef CONFIG_MIDI_INSTRUMENT m_pInstrumentListForm = new InstrumentListForm(this, wflags); #else viewInstrumentsAction->setEnabled(false); #endif // Setup messages logging appropriately... m_pMessages->setLogging( m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); // Set message defaults... updateMessagesFont(); updateMessagesLimit(); updateMessagesCapture(); // Set the visibility signal. QObject::connect(m_pMessages, SIGNAL(visibilityChanged(bool)), SLOT(stabilizeForm())); // Initial decorations toggle state. m_ui.viewMenubarAction->setChecked(m_pOptions->bMenubar); m_ui.viewToolbarAction->setChecked(m_pOptions->bToolbar); m_ui.viewStatusbarAction->setChecked(m_pOptions->bStatusbar); m_ui.channelsAutoArrangeAction->setChecked(m_pOptions->bAutoArrange); // Initial decorations visibility state. viewMenubar(m_pOptions->bMenubar); viewToolbar(m_pOptions->bToolbar); viewStatusbar(m_pOptions->bStatusbar); addDockWidget(Qt::BottomDockWidgetArea, m_pMessages); // Restore whole dock windows state. QByteArray aDockables = m_pOptions->settings().value( "/Layout/DockWindows").toByteArray(); if (!aDockables.isEmpty()) { restoreState(aDockables); } // Try to restore old window positioning and initial visibility. m_pOptions->loadWidgetGeometry(this); m_pOptions->loadWidgetGeometry(m_pInstrumentListForm); m_pOptions->loadWidgetGeometry(m_pDeviceForm); // Final startup stabilization... updateMaxVolume(); updateRecentFilesMenu(); stabilizeForm(); // Make it ready :-) statusBar()->showMessage(tr("Ready"), 3000); // We'll try to start immediately... startSchedule(0); // Register the first timer slot. QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot())); } // Window close event handlers. bool MainForm::queryClose (void) { bool bQueryClose = closeSession(false); // Try to save current general state... if (m_pOptions) { // Some windows default fonts is here on demand too. if (bQueryClose && m_pMessages) m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); // Try to save current positioning. if (bQueryClose) { // Save decorations state. m_pOptions->bMenubar = m_ui.MenuBar->isVisible(); m_pOptions->bToolbar = (m_ui.fileToolbar->isVisible() || m_ui.editToolbar->isVisible() || m_ui.channelsToolbar->isVisible()); m_pOptions->bStatusbar = statusBar()->isVisible(); // Save the dock windows state. const QString sDockables = saveState().toBase64().data(); m_pOptions->settings().setValue("/Layout/DockWindows", saveState()); // And the children, and the main windows state,. m_pOptions->saveWidgetGeometry(m_pDeviceForm); m_pOptions->saveWidgetGeometry(m_pInstrumentListForm); m_pOptions->saveWidgetGeometry(this); // Close popup widgets. if (m_pInstrumentListForm) m_pInstrumentListForm->close(); if (m_pDeviceForm) m_pDeviceForm->close(); // Stop client and/or server, gracefully. stopServer(true /*interactive*/); } } return bQueryClose; } void MainForm::closeEvent ( QCloseEvent *pCloseEvent ) { if (queryClose()) { DeviceStatusForm::deleteAllInstances(); pCloseEvent->accept(); } else pCloseEvent->ignore(); } // Window drag-n-drop event handlers. void MainForm::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) { // Accept external drags only... if (pDragEnterEvent->source() == NULL && pDragEnterEvent->mimeData()->hasUrls()) { pDragEnterEvent->accept(); } else { pDragEnterEvent->ignore(); } } void MainForm::dropEvent ( QDropEvent* pDropEvent ) { // Accept externally originated drops only... if (pDropEvent->source()) return; const QMimeData *pMimeData = pDropEvent->mimeData(); if (pMimeData->hasUrls()) { QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sPath = iter.next().toLocalFile(); if (Channel::isInstrumentFile(sPath)) { // Try to create a new channel from instrument file... Channel *pChannel = new Channel(); if (pChannel == NULL) return; // Start setting the instrument filename... pChannel->setInstrument(sPath, 0); // Before we show it up, may be we'll // better ask for some initial values? if (!pChannel->channelSetup(this)) { delete pChannel; return; } // Finally, give it to a new channel strip... if (!createChannelStrip(pChannel)) { delete pChannel; return; } // Make that an overall update. m_iDirtyCount++; stabilizeForm(); } // Otherwise, load an usual session file (LSCP script)... else if (closeSession(true)) { loadSessionFile(sPath); break; } } // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } } // Custome event handler. void MainForm::customEvent(QEvent* pCustomEvent) { // For the time being, just pump it to messages. if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) { CustomEvent *pEvent = static_cast (pCustomEvent); switch (pEvent->event()) { case LSCP_EVENT_CHANNEL_COUNT: updateAllChannelStrips(true); break; case LSCP_EVENT_CHANNEL_INFO: { int iChannelID = pEvent->data().toInt(); ChannelStrip *pChannelStrip = channelStrip(iChannelID); if (pChannelStrip) channelStripChanged(pChannelStrip); break; } case LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); DeviceStatusForm::onDevicesChanged(); updateViewMidiDeviceStatusMenu(); break; case LSCP_EVENT_MIDI_INPUT_DEVICE_INFO: { if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); DeviceStatusForm::onDeviceChanged(iDeviceID); break; } case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); break; case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); break; #if CONFIG_EVENT_CHANNEL_MIDI case LSCP_EVENT_CHANNEL_MIDI: { const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); ChannelStrip *pChannelStrip = channelStrip(iChannelID); if (pChannelStrip) pChannelStrip->midiArrived(); break; } #endif #if CONFIG_EVENT_DEVICE_MIDI case LSCP_EVENT_DEVICE_MIDI: { const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); DeviceStatusForm* pDeviceStatusForm = DeviceStatusForm::getInstance(iDeviceID); if (pDeviceStatusForm) pDeviceStatusForm->midiArrived(iPortID); break; } #endif default: appendMessagesColor(tr("Notify event: %1 data: %2") .arg(::lscp_event_to_text(pEvent->event())) .arg(pEvent->data()), "#996699"); } } } void MainForm::updateViewMidiDeviceStatusMenu() { m_ui.viewMidiDeviceStatusMenu->clear(); const std::map statusForms = DeviceStatusForm::getInstances(); for ( std::map::const_iterator iter = statusForms.begin(); iter != statusForms.end(); ++iter ) { DeviceStatusForm* pForm = iter->second; m_ui.viewMidiDeviceStatusMenu->addAction( pForm->visibleAction() ); } } // Context menu event handler. void MainForm::contextMenuEvent( QContextMenuEvent *pEvent ) { stabilizeForm(); m_ui.editMenu->exec(pEvent->globalPos()); } //------------------------------------------------------------------------- // qsamplerMainForm -- Brainless public property accessors. // The global options settings property. Options *MainForm::options (void) const { return m_pOptions; } // The LSCP client descriptor property. lscp_client_t *MainForm::client (void) const { return m_pClient; } // The pseudo-singleton instance accessor. MainForm *MainForm::getInstance (void) { return g_pMainForm; } //------------------------------------------------------------------------- // qsamplerMainForm -- Session file stuff. // Format the displayable session filename. QString MainForm::sessionName ( const QString& sFilename ) { bool bCompletePath = (m_pOptions && m_pOptions->bCompletePath); QString sSessionName = sFilename; if (sSessionName.isEmpty()) sSessionName = tr("Untitled") + QString::number(m_iUntitled); else if (!bCompletePath) sSessionName = QFileInfo(sSessionName).fileName(); return sSessionName; } // Create a new session file from scratch. bool MainForm::newSession (void) { // Check if we can do it. if (!closeSession(true)) return false; // Give us what the server has, right now... updateSession(); // Ok increment untitled count. m_iUntitled++; // Stabilize form. m_sFilename = QString::null; m_iDirtyCount = 0; appendMessages(tr("New session: \"%1\".").arg(sessionName(m_sFilename))); stabilizeForm(); return true; } // Open an existing sampler session. bool MainForm::openSession (void) { if (m_pOptions == NULL) return false; // Ask for the filename to open... QString sFilename = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Open Session"), // Caption. m_pOptions->sSessionDir, // Start here. tr("LSCP Session files") + " (*.lscp)" // Filter (LSCP files) ); // Have we cancelled? if (sFilename.isEmpty()) return false; // Check if we're going to discard safely the current one... if (!closeSession(true)) return false; // Load it right away. return loadSessionFile(sFilename); } // Save current sampler session with another name. bool MainForm::saveSession ( bool bPrompt ) { if (m_pOptions == NULL) return false; QString sFilename = m_sFilename; // Ask for the file to save, if there's none... if (bPrompt || sFilename.isEmpty()) { // If none is given, assume default directory. if (sFilename.isEmpty()) sFilename = m_pOptions->sSessionDir; // Prompt the guy... sFilename = QFileDialog::getSaveFileName(this, QSAMPLER_TITLE ": " + tr("Save Session"), // Caption. sFilename, // Start here. tr("LSCP Session files") + " (*.lscp)" // Filter (LSCP files) ); // Have we cancelled it? if (sFilename.isEmpty()) return false; // Enforce .lscp extension... if (QFileInfo(sFilename).suffix().isEmpty()) sFilename += ".lscp"; // Check if already exists... if (sFilename != m_sFilename && QFileInfo(sFilename).exists()) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("The file already exists:\n\n" "\"%1\"\n\n" "Do you want to replace it?") .arg(sFilename), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return false; } } // Save it right away. return saveSessionFile(sFilename); } // Close current session. bool MainForm::closeSession ( bool bForce ) { bool bClose = true; // Are we dirty enough to prompt it? if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("The current session has been changed:\n\n" "\"%1\"\n\n" "Do you want to save the changes?") .arg(sessionName(m_sFilename)), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Save: bClose = saveSession(false); // Fall thru.... case QMessageBox::Discard: break; default: // Cancel. bClose = false; break; } } // If we may close it, dot it. if (bClose) { // Remove all channel strips from sight... m_pWorkspace->setUpdatesEnabled(false); QWidgetList wlist = m_pWorkspace->windowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip *pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (bForce && pChannel) pChannel->removeChannel(); delete pChannelStrip; } } m_pWorkspace->setUpdatesEnabled(true); // We're now clean, for sure. m_iDirtyCount = 0; } return bClose; } // Load a session from specific file path. bool MainForm::loadSessionFile ( const QString& sFilename ) { if (m_pClient == NULL) return false; // Open and read from real file. QFile file(sFilename); if (!file.open(QIODevice::ReadOnly)) { appendMessagesError( tr("Could not open \"%1\" session file.\n\nSorry.") .arg(sFilename)); return false; } // Tell the world we'll take some time... QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // Read the file. int iLine = 0; int iErrors = 0; QTextStream ts(&file); while (!ts.atEnd()) { // Read the line. QString sCommand = ts.readLine().trimmed(); iLine++; // If not empty, nor a comment, call the server... if (!sCommand.isEmpty() && sCommand[0] != '#') { // Remember that, no matter what, // all LSCP commands are CR/LF terminated. sCommand += "\r\n"; if (::lscp_client_query(m_pClient, sCommand.toUtf8().constData()) != LSCP_OK) { appendMessagesColor(QString("%1(%2): %3") .arg(QFileInfo(sFilename).fileName()).arg(iLine) .arg(sCommand.simplified()), "#996633"); appendMessagesClient("lscp_client_query"); iErrors++; } } // Try to make it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Ok. we've read it. file.close(); // Now we'll try to create (update) the whole GUI session. updateSession(); // We're fornerly done. QApplication::restoreOverrideCursor(); // Have we any errors? if (iErrors > 0) { appendMessagesError( tr("Session loaded with errors\nfrom \"%1\".\n\nSorry.") .arg(sFilename)); } // Save as default session directory. if (m_pOptions) m_pOptions->sSessionDir = QFileInfo(sFilename).dir().absolutePath(); // We're not dirty anymore, if loaded without errors, m_iDirtyCount = iErrors; // Stabilize form... m_sFilename = sFilename; updateRecentFiles(sFilename); appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename))); // Make that an overall update. stabilizeForm(); return true; } // Save current session to specific file path. bool MainForm::saveSessionFile ( const QString& sFilename ) { if (m_pClient == NULL) return false; // Check whether server is apparently OK... if (::lscp_get_channels(m_pClient) < 0) { appendMessagesClient("lscp_get_channels"); return false; } // Open and write into real file. QFile file(sFilename); if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { appendMessagesError( tr("Could not open \"%1\" session file.\n\nSorry.") .arg(sFilename)); return false; } // Tell the world we'll take some time... QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // Write the file. int iErrors = 0; QTextStream ts(&file); ts << "# " << QSAMPLER_TITLE " - " << tr(QSAMPLER_SUBTITLE) << endl; ts << "# " << tr("Version") << ": " QSAMPLER_VERSION << endl; ts << "# " << tr("Build") << ": " __DATE__ " " __TIME__ << endl; ts << "#" << endl; ts << "# " << tr("File") << ": " << QFileInfo(sFilename).fileName() << endl; ts << "# " << tr("Date") << ": " << QDate::currentDate().toString("MMM dd yyyy") << " " << QTime::currentTime().toString("hh:mm:ss") << endl; ts << "#" << endl; ts << endl; // It is assumed that this new kind of device+session file // will be loaded from a complete initialized server... int *piDeviceIDs; int iDevice; ts << "RESET" << endl; // Audio device mapping. QMap audioDeviceMap; piDeviceIDs = Device::getDevices(m_pClient, Device::Audio); for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { ts << endl; Device device(Device::Audio, piDeviceIDs[iDevice]); // Audio device specification... ts << "# " << device.deviceTypeName() << " " << device.driverName() << " " << tr("Device") << " " << iDevice << endl; ts << "CREATE AUDIO_OUTPUT_DEVICE " << device.driverName(); DeviceParamMap::ConstIterator deviceParam; for (deviceParam = device.params().begin(); deviceParam != device.params().end(); ++deviceParam) { const DeviceParam& param = deviceParam.value(); if (param.value.isEmpty()) ts << "# "; ts << " " << deviceParam.key() << "='" << param.value << "'"; } ts << endl; // Audio channel parameters... int iPort = 0; QListIterator iter(device.ports()); while (iter.hasNext()) { DevicePort *pPort = iter.next(); DeviceParamMap::ConstIterator portParam; for (portParam = pPort->params().begin(); portParam != pPort->params().end(); ++portParam) { const DeviceParam& param = portParam.value(); if (param.fix || param.value.isEmpty()) ts << "# "; ts << "SET AUDIO_OUTPUT_CHANNEL_PARAMETER " << iDevice << " " << iPort << " " << portParam.key() << "='" << param.value << "'" << endl; } iPort++; } // Audio device index/id mapping. audioDeviceMap[device.deviceID()] = iDevice; // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // MIDI device mapping. QMap midiDeviceMap; piDeviceIDs = Device::getDevices(m_pClient, Device::Midi); for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { ts << endl; Device device(Device::Midi, piDeviceIDs[iDevice]); // MIDI device specification... ts << "# " << device.deviceTypeName() << " " << device.driverName() << " " << tr("Device") << " " << iDevice << endl; ts << "CREATE MIDI_INPUT_DEVICE " << device.driverName(); DeviceParamMap::ConstIterator deviceParam; for (deviceParam = device.params().begin(); deviceParam != device.params().end(); ++deviceParam) { const DeviceParam& param = deviceParam.value(); if (param.value.isEmpty()) ts << "# "; ts << " " << deviceParam.key() << "='" << param.value << "'"; } ts << endl; // MIDI port parameters... int iPort = 0; QListIterator iter(device.ports()); while (iter.hasNext()) { DevicePort *pPort = iter.next(); DeviceParamMap::ConstIterator portParam; for (portParam = pPort->params().begin(); portParam != pPort->params().end(); ++portParam) { const DeviceParam& param = portParam.value(); if (param.fix || param.value.isEmpty()) ts << "# "; ts << "SET MIDI_INPUT_PORT_PARAMETER " << iDevice << " " << iPort << " " << portParam.key() << "='" << param.value << "'" << endl; } iPort++; } // MIDI device index/id mapping. midiDeviceMap[device.deviceID()] = iDevice; // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } ts << endl; #ifdef CONFIG_MIDI_INSTRUMENT // MIDI instrument mapping... QMap midiInstrumentMap; int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient); for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) { int iMidiMap = piMaps[iMap]; const char *pszMapName = ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap); ts << "# " << tr("MIDI instrument map") << " " << iMap; if (pszMapName) ts << " - " << pszMapName; ts << endl; ts << "ADD MIDI_INSTRUMENT_MAP"; if (pszMapName) ts << " '" << pszMapName << "'"; ts << endl; // MIDI instrument mapping... lscp_midi_instrument_t *pInstrs = ::lscp_list_midi_instruments(m_pClient, iMidiMap); for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; iInstr++) { lscp_midi_instrument_info_t *pInstrInfo = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]); if (pInstrInfo) { ts << "MAP MIDI_INSTRUMENT " << iMap << " " << pInstrs[iInstr].bank << " " << pInstrs[iInstr].prog << " " << pInstrInfo->engine_name << " '" << pInstrInfo->instrument_file << "' " << pInstrInfo->instrument_nr << " " << pInstrInfo->volume << " "; switch (pInstrInfo->load_mode) { case LSCP_LOAD_PERSISTENT: ts << "PERSISTENT"; break; case LSCP_LOAD_ON_DEMAND_HOLD: ts << "ON_DEMAND_HOLD"; break; case LSCP_LOAD_ON_DEMAND: case LSCP_LOAD_DEFAULT: default: ts << "ON_DEMAND"; break; } if (pInstrInfo->name) ts << " '" << pInstrInfo->name << "'"; ts << endl; } // Check for errors... else if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_get_midi_instrument_info"); iErrors++; } // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } ts << endl; // Check for errors... if (pInstrs == NULL && ::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_midi_instruments"); iErrors++; } // MIDI strument index/id mapping. midiInstrumentMap[iMidiMap] = iMap; } // Check for errors... if (piMaps == NULL && ::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_midi_instrument_maps"); iErrors++; } #endif // CONFIG_MIDI_INSTRUMENT // Sampler channel mapping. QWidgetList wlist = m_pWorkspace->windowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = static_cast (wlist.at(iChannel)); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (pChannel) { ts << "# " << tr("Channel") << " " << iChannel << endl; ts << "ADD CHANNEL" << endl; if (audioDeviceMap.isEmpty()) { ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannel << " " << pChannel->audioDriver() << endl; } else { ts << "SET CHANNEL AUDIO_OUTPUT_DEVICE " << iChannel << " " << audioDeviceMap[pChannel->audioDevice()] << endl; } if (midiDeviceMap.isEmpty()) { ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannel << " " << pChannel->midiDriver() << endl; } else { ts << "SET CHANNEL MIDI_INPUT_DEVICE " << iChannel << " " << midiDeviceMap[pChannel->midiDevice()] << endl; } ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannel << " " << pChannel->midiPort() << endl; ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannel << " "; if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) ts << "ALL"; else ts << pChannel->midiChannel(); ts << endl; ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; if (pChannel->instrumentStatus() < 100) ts << "# "; ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; ChannelRoutingMap::ConstIterator audioRoute; for (audioRoute = pChannel->audioRouting().begin(); audioRoute != pChannel->audioRouting().end(); ++audioRoute) { ts << "SET CHANNEL AUDIO_OUTPUT_CHANNEL " << iChannel << " " << audioRoute.key() << " " << audioRoute.value() << endl; } ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; if (pChannel->channelMute()) ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl; if (pChannel->channelSolo()) ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl; #ifdef CONFIG_MIDI_INSTRUMENT if (pChannel->midiMap() >= 0) { ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel << " " << midiInstrumentMap[pChannel->midiMap()] << endl; } #endif #ifdef CONFIG_FXSEND int iChannelID = pChannel->channelID(); int *piFxSends = ::lscp_list_fxsends(m_pClient, iChannelID); for (int iFxSend = 0; piFxSends && piFxSends[iFxSend] >= 0; iFxSend++) { lscp_fxsend_info_t *pFxSendInfo = ::lscp_get_fxsend_info( m_pClient, iChannelID, piFxSends[iFxSend]); if (pFxSendInfo) { ts << "CREATE FX_SEND " << iChannel << " " << pFxSendInfo->midi_controller; if (pFxSendInfo->name) ts << " '" << pFxSendInfo->name << "'"; ts << endl; int *piRouting = pFxSendInfo->audio_routing; for (int iAudioSrc = 0; piRouting && piRouting[iAudioSrc] >= 0; iAudioSrc++) { ts << "SET FX_SEND AUDIO_OUTPUT_CHANNEL " << iChannel << " " << iFxSend << " " << iAudioSrc << " " << piRouting[iAudioSrc] << endl; } #ifdef CONFIG_FXSEND_LEVEL ts << "SET FX_SEND LEVEL " << iChannel << " " << iFxSend << " " << pFxSendInfo->level << endl; #endif } // Check for errors... else if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_get_fxsend_info"); iErrors++; } } #endif ts << endl; } } // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } #ifdef CONFIG_VOLUME ts << "# " << tr("Global volume level") << endl; ts << "SET VOLUME " << ::lscp_get_volume(m_pClient) << endl; ts << endl; #endif // Ok. we've wrote it. file.close(); // We're fornerly done. QApplication::restoreOverrideCursor(); // Have we any errors? if (iErrors > 0) { appendMessagesError( tr("Some settings could not be saved\n" "to \"%1\" session file.\n\nSorry.") .arg(sFilename)); } // Save as default session directory. if (m_pOptions) m_pOptions->sSessionDir = QFileInfo(sFilename).dir().absolutePath(); // We're not dirty anymore. m_iDirtyCount = 0; // Stabilize form... m_sFilename = sFilename; updateRecentFiles(sFilename); appendMessages(tr("Save session: \"%1\".").arg(sessionName(m_sFilename))); stabilizeForm(); return true; } // Session change receiver slot. void MainForm::sessionDirty (void) { // Just mark the dirty form. m_iDirtyCount++; // and update the form status... stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- File Action slots. // Create a new sampler session. void MainForm::fileNew (void) { // Of course we'll start clean new. newSession(); } // Open an existing sampler session. void MainForm::fileOpen (void) { // Open it right away. openSession(); } // Open a recent file session. void MainForm::fileOpenRecent (void) { // Retrive filename index from action data... QAction *pAction = qobject_cast (sender()); if (pAction && m_pOptions) { int iIndex = pAction->data().toInt(); if (iIndex >= 0 && iIndex < m_pOptions->recentFiles.count()) { QString sFilename = m_pOptions->recentFiles[iIndex]; // Check if we can safely close the current session... if (!sFilename.isEmpty() && closeSession(true)) loadSessionFile(sFilename); } } } // Save current sampler session. void MainForm::fileSave (void) { // Save it right away. saveSession(false); } // Save current sampler session with another name. void MainForm::fileSaveAs (void) { // Save it right away, maybe with another name. saveSession(true); } // Reset the sampler instance. void MainForm::fileReset (void) { if (m_pClient == NULL) return; // Ask user whether he/she want's an internal sampler reset... if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Resetting the sampler instance will close\n" "all device and channel configurations.\n\n" "Please note that this operation may cause\n" "temporary MIDI and Audio disruption.\n\n" "Do you want to reset the sampler engine now?"), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; // Trye closing the current session, first... if (!closeSession(true)) return; // Just do the reset, after closing down current session... // Do the actual sampler reset... if (::lscp_reset_sampler(m_pClient) != LSCP_OK) { appendMessagesClient("lscp_reset_sampler"); appendMessagesError(tr("Could not reset sampler instance.\n\nSorry.")); return; } // Log this. appendMessages(tr("Sampler reset.")); // Make it a new session... newSession(); } // Restart the client/server instance. void MainForm::fileRestart (void) { if (m_pOptions == NULL) return; bool bRestart = true; // Ask user whether he/she want's a complete restart... // (if we're currently up and running) if (bRestart && m_pClient) { bRestart = (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("New settings will be effective after\n" "restarting the client/server connection.\n\n" "Please note that this operation may cause\n" "temporary MIDI and Audio disruption.\n\n" "Do you want to restart the connection now?"), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); } // Are we still for it? if (bRestart && closeSession(true)) { // Stop server, it will force the client too. stopServer(); // Reschedule a restart... startSchedule(m_pOptions->iStartDelay); } } // Exit application program. void MainForm::fileExit (void) { // Go for close the whole thing. close(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Edit Action slots. // Add a new sampler channel. void MainForm::editAddChannel (void) { if (m_pClient == NULL) return; // Just create the channel instance... Channel *pChannel = new Channel(); if (pChannel == NULL) return; // Before we show it up, may be we'll // better ask for some initial values? if (!pChannel->channelSetup(this)) { delete pChannel; return; } // And give it to the strip... // (will own the channel instance, if successful). if (!createChannelStrip(pChannel)) { delete pChannel; return; } // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // Make that an overall update. m_iDirtyCount++; stabilizeForm(); } // Remove current sampler channel. void MainForm::editRemoveChannel (void) { if (m_pClient == NULL) return; ChannelStrip* pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; Channel *pChannel = pChannelStrip->channel(); if (pChannel == NULL) return; // Prompt user if he/she's sure about this... if (m_pOptions && m_pOptions->bConfirmRemove) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("About to remove channel:\n\n" "%1\n\n" "Are you sure?") .arg(pChannelStrip->windowTitle()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; } // Remove the existing sampler channel. if (!pChannel->removeChannel()) return; // Just delete the channel strip. delete pChannelStrip; // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // We'll be dirty, for sure... m_iDirtyCount++; stabilizeForm(); } // Setup current sampler channel. void MainForm::editSetupChannel (void) { if (m_pClient == NULL) return; ChannelStrip* pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelSetup(); } // Edit current sampler channel. void MainForm::editEditChannel (void) { if (m_pClient == NULL) return; ChannelStrip* pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelEdit(); } // Reset current sampler channel. void MainForm::editResetChannel (void) { if (m_pClient == NULL) return; ChannelStrip* pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelReset(); } // Reset all sampler channels. void MainForm::editResetAllChannels (void) { if (m_pClient == NULL) return; // Invoque the channel strip procedure, // for all channels out there... m_pWorkspace->setUpdatesEnabled(false); QWidgetList wlist = m_pWorkspace->windowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->channelReset(); } m_pWorkspace->setUpdatesEnabled(true); } //------------------------------------------------------------------------- // qsamplerMainForm -- View Action slots. // Show/hide the main program window menubar. void MainForm::viewMenubar ( bool bOn ) { if (bOn) m_ui.MenuBar->show(); else m_ui.MenuBar->hide(); } // Show/hide the main program window toolbar. void MainForm::viewToolbar ( bool bOn ) { if (bOn) { m_ui.fileToolbar->show(); m_ui.editToolbar->show(); m_ui.channelsToolbar->show(); } else { m_ui.fileToolbar->hide(); m_ui.editToolbar->hide(); m_ui.channelsToolbar->hide(); } } // Show/hide the main program window statusbar. void MainForm::viewStatusbar ( bool bOn ) { if (bOn) statusBar()->show(); else statusBar()->hide(); } // Show/hide the messages window logger. void MainForm::viewMessages ( bool bOn ) { if (bOn) m_pMessages->show(); else m_pMessages->hide(); } // Show/hide the MIDI instrument list-view form. void MainForm::viewInstruments (void) { if (m_pOptions == NULL) return; if (m_pInstrumentListForm) { m_pOptions->saveWidgetGeometry(m_pInstrumentListForm); if (m_pInstrumentListForm->isVisible()) { m_pInstrumentListForm->hide(); } else { m_pInstrumentListForm->show(); m_pInstrumentListForm->raise(); m_pInstrumentListForm->activateWindow(); } } } // Show/hide the device configurator form. void MainForm::viewDevices (void) { if (m_pOptions == NULL) return; if (m_pDeviceForm) { m_pOptions->saveWidgetGeometry(m_pDeviceForm); if (m_pDeviceForm->isVisible()) { m_pDeviceForm->hide(); } else { m_pDeviceForm->show(); m_pDeviceForm->raise(); m_pDeviceForm->activateWindow(); } } } // Show options dialog. void MainForm::viewOptions (void) { if (m_pOptions == NULL) return; OptionsForm* pOptionsForm = new OptionsForm(this); if (pOptionsForm) { // Check out some initial nullities(tm)... ChannelStrip* pChannelStrip = activeChannelStrip(); if (m_pOptions->sDisplayFont.isEmpty() && pChannelStrip) m_pOptions->sDisplayFont = pChannelStrip->displayFont().toString(); if (m_pOptions->sMessagesFont.isEmpty() && m_pMessages) m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); // To track down deferred or immediate changes. QString sOldServerHost = m_pOptions->sServerHost; int iOldServerPort = m_pOptions->iServerPort; int iOldServerTimeout = m_pOptions->iServerTimeout; bool bOldServerStart = m_pOptions->bServerStart; QString sOldServerCmdLine = m_pOptions->sServerCmdLine; bool bOldMessagesLog = m_pOptions->bMessagesLog; QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; QString sOldDisplayFont = m_pOptions->sDisplayFont; bool bOldDisplayEffect = m_pOptions->bDisplayEffect; int iOldMaxVolume = m_pOptions->iMaxVolume; QString sOldMessagesFont = m_pOptions->sMessagesFont; bool bOldKeepOnTop = m_pOptions->bKeepOnTop; bool bOldStdoutCapture = m_pOptions->bStdoutCapture; int bOldMessagesLimit = m_pOptions->bMessagesLimit; int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; bool bOldCompletePath = m_pOptions->bCompletePath; bool bOldInstrumentNames = m_pOptions->bInstrumentNames; int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; int iOldBaseFontSize = m_pOptions->iBaseFontSize; // Load the current setup settings. pOptionsForm->setup(m_pOptions); // Show the setup dialog... if (pOptionsForm->exec()) { // Warn if something will be only effective on next run. if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || (!bOldStdoutCapture && m_pOptions->bStdoutCapture) || ( bOldKeepOnTop && !m_pOptions->bKeepOnTop) || (!bOldKeepOnTop && m_pOptions->bKeepOnTop) || (iOldBaseFontSize != m_pOptions->iBaseFontSize)) { QMessageBox::information(this, QSAMPLER_TITLE ": " + tr("Information"), tr("Some settings may be only effective\n" "next time you start this program.")); updateMessagesCapture(); } // Check wheather something immediate has changed. if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || (!bOldMessagesLog && m_pOptions->bMessagesLog) || (sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) m_pMessages->setLogging( m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); if (( bOldCompletePath && !m_pOptions->bCompletePath) || (!bOldCompletePath && m_pOptions->bCompletePath) || (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) updateRecentFilesMenu(); if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) || (!bOldInstrumentNames && m_pOptions->bInstrumentNames)) updateInstrumentNames(); if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) || (!bOldDisplayEffect && m_pOptions->bDisplayEffect)) updateDisplayEffect(); if (sOldDisplayFont != m_pOptions->sDisplayFont) updateDisplayFont(); if (iOldMaxVolume != m_pOptions->iMaxVolume) updateMaxVolume(); if (sOldMessagesFont != m_pOptions->sMessagesFont) updateMessagesFont(); if (( bOldMessagesLimit && !m_pOptions->bMessagesLimit) || (!bOldMessagesLimit && m_pOptions->bMessagesLimit) || (iOldMessagesLimitLines != m_pOptions->iMessagesLimitLines)) updateMessagesLimit(); // And now the main thing, whether we'll do client/server recycling? if ((sOldServerHost != m_pOptions->sServerHost) || (iOldServerPort != m_pOptions->iServerPort) || (iOldServerTimeout != m_pOptions->iServerTimeout) || ( bOldServerStart && !m_pOptions->bServerStart) || (!bOldServerStart && m_pOptions->bServerStart) || (sOldServerCmdLine != m_pOptions->sServerCmdLine && m_pOptions->bServerStart)) fileRestart(); } // Done. delete pOptionsForm; } // This makes it. stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Channels action slots. // Arrange channel strips. void MainForm::channelsArrange (void) { // Full width vertical tiling QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); int y = 0; for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); /* if (pChannelStrip->testWState(WState_Maximized | WState_Minimized)) { // Prevent flicker... pChannelStrip->hide(); pChannelStrip->showNormal(); } */ pChannelStrip->adjustSize(); int iWidth = m_pWorkspace->width(); if (iWidth < pChannelStrip->width()) iWidth = pChannelStrip->width(); // int iHeight = pChannelStrip->height() // + pChannelStrip->parentWidget()->baseSize().height(); int iHeight = pChannelStrip->parentWidget()->frameGeometry().height(); pChannelStrip->parentWidget()->setGeometry(0, y, iWidth, iHeight); y += iHeight; } m_pWorkspace->setUpdatesEnabled(true); stabilizeForm(); } // Auto-arrange channel strips. void MainForm::channelsAutoArrange ( bool bOn ) { if (m_pOptions == NULL) return; // Toggle the auto-arrange flag. m_pOptions->bAutoArrange = bOn; // If on, update whole workspace... if (m_pOptions->bAutoArrange) channelsArrange(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Help Action slots. // Show information about the Qt toolkit. void MainForm::helpAboutQt (void) { QMessageBox::aboutQt(this); } // Show information about application program. void MainForm::helpAbout (void) { // Stuff the about box text... QString sText = "

\n"; sText += "" QSAMPLER_TITLE " - " + tr(QSAMPLER_SUBTITLE) + "
\n"; sText += "
\n"; sText += tr("Version") + ": " QSAMPLER_VERSION "
\n"; sText += "" + tr("Build") + ": " __DATE__ " " __TIME__ "
\n"; #ifdef CONFIG_DEBUG sText += ""; sText += tr("Debugging option enabled."); sText += "
"; #endif #ifndef CONFIG_LIBGIG sText += ""; sText += tr("GIG (libgig) file support disabled."); sText += "
"; #endif #ifndef CONFIG_INSTRUMENT_NAME sText += ""; sText += tr("LSCP (liblscp) instrument_name support disabled."); sText += "
"; #endif #ifndef CONFIG_MUTE_SOLO sText += ""; sText += tr("Sampler channel Mute/Solo support disabled."); sText += "
"; #endif #ifndef CONFIG_AUDIO_ROUTING sText += ""; sText += tr("LSCP (liblscp) audio_routing support disabled."); sText += "
"; #endif #ifndef CONFIG_FXSEND sText += ""; sText += tr("Sampler channel Effect Sends support disabled."); sText += "
"; #endif #ifndef CONFIG_VOLUME sText += ""; sText += tr("Global volume support disabled."); sText += "
"; #endif #ifndef CONFIG_MIDI_INSTRUMENT sText += ""; sText += tr("MIDI instrument mapping support disabled."); sText += "
"; #endif #ifndef CONFIG_EDIT_INSTRUMENT sText += ""; sText += tr("Instrument editing support disabled."); sText += "
"; #endif #ifndef CONFIG_EVENT_CHANNEL_MIDI sText += ""; sText += tr("Channel MIDI event support disabled."); sText += "
"; #endif #ifndef CONFIG_EVENT_DEVICE_MIDI sText += ""; sText += tr("Device MIDI event support disabled."); sText += "
"; #endif #ifndef CONFIG_MAX_VOICES sText += ""; sText += tr("Runtime max. voices / disk streams support disabled."); sText += "
"; #endif sText += "
\n"; sText += tr("Using") + ": "; sText += ::lscp_client_package(); sText += " "; sText += ::lscp_client_version(); #ifdef CONFIG_LIBGIG sText += ", "; sText += gig::libraryName().c_str(); sText += " "; sText += gig::libraryVersion().c_str(); #endif sText += "
\n"; sText += "
\n"; sText += tr("Website") + ": " QSAMPLER_WEBSITE "
\n"; sText += "
\n"; sText += ""; sText += QSAMPLER_COPYRIGHT "
\n"; sText += QSAMPLER_COPYRIGHT2 "
\n"; sText += "
\n"; sText += tr("This program is free software; you can redistribute it and/or modify it") + "
\n"; sText += tr("under the terms of the GNU General Public License version 2 or later."); sText += "
"; sText += "

\n"; QMessageBox::about(this, tr("About") + " " QSAMPLER_TITLE, sText); } //------------------------------------------------------------------------- // qsamplerMainForm -- Main window stabilization. void MainForm::stabilizeForm (void) { // Update the main application caption... QString sSessionName = sessionName(m_sFilename); if (m_iDirtyCount > 0) sSessionName += " *"; setWindowTitle(tr(QSAMPLER_TITLE " - [%1]").arg(sSessionName)); // Update the main menu state... ChannelStrip* pChannelStrip = activeChannelStrip(); bool bHasClient = (m_pOptions != NULL && m_pClient != NULL); bool bHasChannel = (bHasClient && pChannelStrip != NULL); m_ui.fileNewAction->setEnabled(bHasClient); m_ui.fileOpenAction->setEnabled(bHasClient); m_ui.fileSaveAction->setEnabled(bHasClient && m_iDirtyCount > 0); m_ui.fileSaveAsAction->setEnabled(bHasClient); m_ui.fileResetAction->setEnabled(bHasClient); m_ui.fileRestartAction->setEnabled(bHasClient || m_pServer == NULL); m_ui.editAddChannelAction->setEnabled(bHasClient); m_ui.editRemoveChannelAction->setEnabled(bHasChannel); m_ui.editSetupChannelAction->setEnabled(bHasChannel); #ifdef CONFIG_EDIT_INSTRUMENT m_ui.editEditChannelAction->setEnabled(bHasChannel); #else m_ui.editEditChannelAction->setEnabled(false); #endif m_ui.editResetChannelAction->setEnabled(bHasChannel); m_ui.editResetAllChannelsAction->setEnabled(bHasChannel); m_ui.viewMessagesAction->setChecked(m_pMessages && m_pMessages->isVisible()); #ifdef CONFIG_MIDI_INSTRUMENT m_ui.viewInstrumentsAction->setChecked(m_pInstrumentListForm && m_pInstrumentListForm->isVisible()); m_ui.viewInstrumentsAction->setEnabled(bHasClient); #else m_ui.viewInstrumentsAction->setEnabled(false); #endif m_ui.viewDevicesAction->setChecked(m_pDeviceForm && m_pDeviceForm->isVisible()); m_ui.viewDevicesAction->setEnabled(bHasClient); m_ui.channelsArrangeAction->setEnabled(bHasChannel); #ifdef CONFIG_VOLUME // Toolbar widgets are also affected... m_pVolumeSlider->setEnabled(bHasClient); m_pVolumeSpinBox->setEnabled(bHasClient); #endif // Client/Server status... if (bHasClient) { m_statusItem[QSAMPLER_STATUS_CLIENT]->setText(tr("Connected")); m_statusItem[QSAMPLER_STATUS_SERVER]->setText(m_pOptions->sServerHost + ':' + QString::number(m_pOptions->iServerPort)); } else { m_statusItem[QSAMPLER_STATUS_CLIENT]->clear(); m_statusItem[QSAMPLER_STATUS_SERVER]->clear(); } // Channel status... if (bHasChannel) m_statusItem[QSAMPLER_STATUS_CHANNEL]->setText(pChannelStrip->windowTitle()); else m_statusItem[QSAMPLER_STATUS_CHANNEL]->clear(); // Session status... if (m_iDirtyCount > 0) m_statusItem[QSAMPLER_STATUS_SESSION]->setText(tr("MOD")); else m_statusItem[QSAMPLER_STATUS_SESSION]->clear(); // Recent files menu. m_ui.fileOpenRecentMenu->setEnabled(m_pOptions->recentFiles.count() > 0); } // Global volume change receiver slot. void MainForm::volumeChanged ( int iVolume ) { #ifdef CONFIG_VOLUME if (m_iVolumeChanging > 0) return; m_iVolumeChanging++; // Update the toolbar widgets... if (m_pVolumeSlider->value() != iVolume) m_pVolumeSlider->setValue(iVolume); if (m_pVolumeSpinBox->value() != iVolume) m_pVolumeSpinBox->setValue(iVolume); // Do it as commanded... float fVolume = 0.01f * float(iVolume); if (::lscp_set_volume(m_pClient, fVolume) == LSCP_OK) appendMessages(QObject::tr("Volume: %1.").arg(fVolume)); else appendMessagesClient("lscp_set_volume"); m_iVolumeChanging--; m_iDirtyCount++; stabilizeForm(); #endif } // Channel change receiver slot. void MainForm::channelStripChanged(ChannelStrip* pChannelStrip) { // Add this strip to the changed list... if (!m_changedStrips.contains(pChannelStrip)) { m_changedStrips.append(pChannelStrip); pChannelStrip->resetErrorCount(); } // Just mark the dirty form. m_iDirtyCount++; // and update the form status... stabilizeForm(); } // Grab and restore current sampler channels session. void MainForm::updateSession (void) { #ifdef CONFIG_VOLUME int iVolume = ::lroundf(100.0f * ::lscp_get_volume(m_pClient)); m_iVolumeChanging++; m_pVolumeSlider->setValue(iVolume); m_pVolumeSpinBox->setValue(iVolume); m_iVolumeChanging--; #endif #ifdef CONFIG_MIDI_INSTRUMENT // FIXME: Make some room for default instrument maps... int iMaps = ::lscp_get_midi_instrument_maps(m_pClient); if (iMaps < 0) appendMessagesClient("lscp_get_midi_instrument_maps"); else if (iMaps < 1) { ::lscp_add_midi_instrument_map(m_pClient, tr("Chromatic").toUtf8().constData()); ::lscp_add_midi_instrument_map(m_pClient, tr("Drum Kits").toUtf8().constData()); } #endif updateAllChannelStrips(false); // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // Remember to refresh devices and instruments... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); } void MainForm::updateAllChannelStrips(bool bRemoveDeadStrips) { // Retrieve the current channel list. int *piChannelIDs = ::lscp_list_channels(m_pClient); if (piChannelIDs == NULL) { if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_channels"); appendMessagesError( tr("Could not get current list of channels.\n\nSorry.")); } } else { // Try to (re)create each channel. m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) { // Check if theres already a channel strip for this one... if (!channelStrip(piChannelIDs[iChannel])) createChannelStrip(new Channel(piChannelIDs[iChannel])); } // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); stabilizeForm(); // remove dead channel strips if (bRemoveDeadStrips) { for (int i = 0; channelStripAt(i); ++i) { ChannelStrip* pChannelStrip = channelStripAt(i); bool bExists = false; for (int j = 0; piChannelIDs[j] >= 0; ++j) { if (!pChannelStrip->channel()) break; if (piChannelIDs[j] == pChannelStrip->channel()->channelID()) { // strip exists, don't touch it bExists = true; break; } } if (!bExists) destroyChannelStrip(pChannelStrip); } } m_pWorkspace->setUpdatesEnabled(true); } } // Update the recent files list and menu. void MainForm::updateRecentFiles ( const QString& sFilename ) { if (m_pOptions == NULL) return; // Remove from list if already there (avoid duplicates) int iIndex = m_pOptions->recentFiles.indexOf(sFilename); if (iIndex >= 0) m_pOptions->recentFiles.removeAt(iIndex); // Put it to front... m_pOptions->recentFiles.push_front(sFilename); } // Update the recent files list and menu. void MainForm::updateRecentFilesMenu (void) { if (m_pOptions == NULL) return; // Time to keep the list under limits. int iRecentFiles = m_pOptions->recentFiles.count(); while (iRecentFiles > m_pOptions->iMaxRecentFiles) { m_pOptions->recentFiles.pop_back(); iRecentFiles--; } // Rebuild the recent files menu... m_ui.fileOpenRecentMenu->clear(); for (int i = 0; i < iRecentFiles; i++) { const QString& sFilename = m_pOptions->recentFiles[i]; if (QFileInfo(sFilename).exists()) { QAction *pAction = m_ui.fileOpenRecentMenu->addAction( QString("&%1 %2").arg(i + 1).arg(sessionName(sFilename)), this, SLOT(fileOpenRecent())); pAction->setData(i); } } } // Force update of the channels instrument names mode. void MainForm::updateInstrumentNames (void) { // Full channel list update... QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip *pChannelStrip = (ChannelStrip *) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->updateInstrumentName(true); } m_pWorkspace->setUpdatesEnabled(true); } // Force update of the channels display font. void MainForm::updateDisplayFont (void) { if (m_pOptions == NULL) return; // Check if display font is legal. if (m_pOptions->sDisplayFont.isEmpty()) return; // Realize it. QFont font; if (!font.fromString(m_pOptions->sDisplayFont)) return; // Full channel list update... QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->setDisplayFont(font); } m_pWorkspace->setUpdatesEnabled(true); } // Update channel strips background effect. void MainForm::updateDisplayEffect (void) { // Full channel list update... QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->setDisplayEffect(m_pOptions->bDisplayEffect); } m_pWorkspace->setUpdatesEnabled(true); } // Force update of the channels maximum volume setting. void MainForm::updateMaxVolume (void) { if (m_pOptions == NULL) return; #ifdef CONFIG_VOLUME m_iVolumeChanging++; m_pVolumeSlider->setMaximum(m_pOptions->iMaxVolume); m_pVolumeSpinBox->setMaximum(m_pOptions->iMaxVolume); m_iVolumeChanging--; #endif // Full channel list update... QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); } m_pWorkspace->setUpdatesEnabled(true); } //------------------------------------------------------------------------- // qsamplerMainForm -- Messages window form handlers. // Messages output methods. void MainForm::appendMessages( const QString& s ) { if (m_pMessages) m_pMessages->appendMessages(s); statusBar()->showMessage(s, 3000); } void MainForm::appendMessagesColor( const QString& s, const QString& c ) { if (m_pMessages) m_pMessages->appendMessagesColor(s, c); statusBar()->showMessage(s, 3000); } void MainForm::appendMessagesText( const QString& s ) { if (m_pMessages) m_pMessages->appendMessagesText(s); } void MainForm::appendMessagesError( const QString& s ) { if (m_pMessages) m_pMessages->show(); appendMessagesColor(s.simplified(), "#ff0000"); // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); QMessageBox::critical(this, QSAMPLER_TITLE ": " + tr("Error"), s, QMessageBox::Cancel); } // This is a special message format, just for client results. void MainForm::appendMessagesClient( const QString& s ) { if (m_pClient == NULL) return; appendMessagesColor(s + QString(": %1 (errno=%2)") .arg(::lscp_client_get_result(m_pClient)) .arg(::lscp_client_get_errno(m_pClient)), "#996666"); // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Force update of the messages font. void MainForm::updateMessagesFont (void) { if (m_pOptions == NULL) return; if (m_pMessages && !m_pOptions->sMessagesFont.isEmpty()) { QFont font; if (font.fromString(m_pOptions->sMessagesFont)) m_pMessages->setMessagesFont(font); } } // Update messages window line limit. void MainForm::updateMessagesLimit (void) { if (m_pOptions == NULL) return; if (m_pMessages) { if (m_pOptions->bMessagesLimit) m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); else m_pMessages->setMessagesLimit(-1); } } // Enablement of the messages capture feature. void MainForm::updateMessagesCapture (void) { if (m_pOptions == NULL) return; if (m_pMessages) m_pMessages->setCaptureEnabled(m_pOptions->bStdoutCapture); } //------------------------------------------------------------------------- // qsamplerMainForm -- MDI channel strip management. // The channel strip creation executive. ChannelStrip* MainForm::createChannelStrip ( Channel *pChannel ) { if (m_pClient == NULL || pChannel == NULL) return NULL; // Add a new channel itema... ChannelStrip *pChannelStrip = new ChannelStrip(); if (pChannelStrip == NULL) return NULL; // Set some initial channel strip options... if (m_pOptions) { // Background display effect... pChannelStrip->setDisplayEffect(m_pOptions->bDisplayEffect); // We'll need a display font. QFont font; if (font.fromString(m_pOptions->sDisplayFont)) pChannelStrip->setDisplayFont(font); // Maximum allowed volume setting. pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); } // Add it to workspace... m_pWorkspace->addWindow(pChannelStrip, Qt::FramelessWindowHint); // Actual channel strip setup... pChannelStrip->setup(pChannel); QObject::connect(pChannelStrip, SIGNAL(channelChanged(ChannelStrip*)), SLOT(channelStripChanged(ChannelStrip*))); // Now we show up us to the world. pChannelStrip->show(); // This is pretty new, so we'll watch for it closely. channelStripChanged(pChannelStrip); // Return our successful reference... return pChannelStrip; } void MainForm::destroyChannelStrip(ChannelStrip* pChannelStrip) { // Just delete the channel strip. delete pChannelStrip; // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); stabilizeForm(); } // Retrieve the active channel strip. ChannelStrip* MainForm::activeChannelStrip (void) { return static_cast (m_pWorkspace->activeWindow()); } // Retrieve a channel strip by index. ChannelStrip* MainForm::channelStripAt ( int iChannel ) { if (!m_pWorkspace) return NULL; QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return NULL; if (iChannel < 0 || iChannel >= wlist.size()) return NULL; return dynamic_cast (wlist.at(iChannel)); } // Retrieve a channel strip by sampler channel id. ChannelStrip* MainForm::channelStrip ( int iChannelID ) { QWidgetList wlist = m_pWorkspace->windowList(); if (wlist.isEmpty()) return NULL; for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = static_cast (wlist.at(iChannel)); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (pChannel && pChannel->channelID() == iChannelID) return pChannelStrip; } } // Not found. return NULL; } // Construct the windows menu. void MainForm::channelsMenuAboutToShow (void) { m_ui.channelsMenu->clear(); m_ui.channelsMenu->addAction(m_ui.channelsArrangeAction); m_ui.channelsMenu->addAction(m_ui.channelsAutoArrangeAction); QWidgetList wlist = m_pWorkspace->windowList(); if (!wlist.isEmpty()) { m_ui.channelsMenu->addSeparator(); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = static_cast (wlist.at(iChannel)); if (pChannelStrip) { QAction *pAction = m_ui.channelsMenu->addAction( pChannelStrip->windowTitle(), this, SLOT(channelsMenuActivated())); pAction->setCheckable(true); pAction->setChecked(activeChannelStrip() == pChannelStrip); pAction->setData(iChannel); } } } } // Windows menu activation slot void MainForm::channelsMenuActivated (void) { // Retrive channel index from action data... QAction *pAction = qobject_cast (sender()); if (pAction == NULL) return; ChannelStrip* pChannelStrip = channelStripAt(pAction->data().toInt()); if (pChannelStrip) { pChannelStrip->showNormal(); pChannelStrip->setFocus(); } } //------------------------------------------------------------------------- // qsamplerMainForm -- Timer stuff. // Set the pseudo-timer delay schedule. void MainForm::startSchedule ( int iStartDelay ) { m_iStartDelay = 1 + (iStartDelay * 1000); m_iTimerDelay = 0; } // Suspend the pseudo-timer delay schedule. void MainForm::stopSchedule (void) { m_iStartDelay = 0; m_iTimerDelay = 0; } // Timer slot funtion. void MainForm::timerSlot (void) { if (m_pOptions == NULL) return; // Is it the first shot on server start after a few delay? if (m_iTimerDelay < m_iStartDelay) { m_iTimerDelay += QSAMPLER_TIMER_MSECS; if (m_iTimerDelay >= m_iStartDelay) { // If we cannot start it now, maybe a lil'mo'later ;) if (!startClient()) { m_iStartDelay += m_iTimerDelay; m_iTimerDelay = 0; } } } if (m_pClient) { // Update the channel information for each pending strip... QListIterator iter(m_changedStrips); while (iter.hasNext()) { ChannelStrip *pChannelStrip = iter.next(); // If successfull, remove from pending list... if (pChannelStrip->updateChannelInfo()) { int iChannelStrip = m_changedStrips.indexOf(pChannelStrip); if (iChannelStrip >= 0) m_changedStrips.removeAt(iChannelStrip); } } // Refresh each channel usage, on each period... if (m_pOptions->bAutoRefresh) { m_iTimerSlot += QSAMPLER_TIMER_MSECS; if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime) { m_iTimerSlot = 0; // Update the channel stream usage for each strip... QWidgetList wlist = m_pWorkspace->windowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { ChannelStrip* pChannelStrip = (ChannelStrip*) wlist.at(iChannel); if (pChannelStrip && pChannelStrip->isVisible()) pChannelStrip->updateChannelUsage(); } } } } // Register the next timer slot. QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot())); } //------------------------------------------------------------------------- // qsamplerMainForm -- Server stuff. // Start linuxsampler server... void MainForm::startServer (void) { if (m_pOptions == NULL) return; // Aren't already a client, are we? if (!m_pOptions->bServerStart || m_pClient) return; // Is the server process instance still here? if (m_pServer) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Could not start the LinuxSampler server.\n\n" "Maybe it is already started."), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { m_pServer->terminate(); m_pServer->kill(); } return; } // Reset our timer counters... stopSchedule(); // Verify we have something to start with... if (m_pOptions->sServerCmdLine.isEmpty()) return; // OK. Let's build the startup process... m_pServer = new QProcess(); bForceServerStop = true; // Setup stdout/stderr capture... // if (m_pOptions->bStdoutCapture) { #if QT_VERSION >= 0x040200 m_pServer->setProcessChannelMode(QProcess::ForwardedChannels); #endif QObject::connect(m_pServer, SIGNAL(readyReadStandardOutput()), SLOT(readServerStdout())); QObject::connect(m_pServer, SIGNAL(readyReadStandardError()), SLOT(readServerStdout())); // } // The unforgiveable signal communication... QObject::connect(m_pServer, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processServerExit())); // Build process arguments... QStringList args = m_pOptions->sServerCmdLine.split(' '); QString sCommand = args[0]; args.removeAt(0); appendMessages(tr("Server is starting...")); appendMessagesColor(m_pOptions->sServerCmdLine, "#990099"); // Go linuxsampler, go... m_pServer->start(sCommand, args); if (!m_pServer->waitForStarted()) { appendMessagesError(tr("Could not start server.\n\nSorry.")); processServerExit(); return; } // Show startup results... appendMessages( tr("Server was started with PID=%1.").arg((long) m_pServer->pid())); // Reset (yet again) the timer counters, // but this time is deferred as the user opted. startSchedule(m_pOptions->iStartDelay); stabilizeForm(); } // Stop linuxsampler server... void MainForm::stopServer (bool bInteractive) { // Stop client code. stopClient(); if (m_pServer && bInteractive) { if (QMessageBox::question(this, QSAMPLER_TITLE ": " + tr("The backend's fate ..."), tr("You have the option to keep the sampler backend (LinuxSampler)\n" "running in the background. The sampler would continue to work\n" "according to your current sampler session and you could alter the\n" "sampler session at any time by relaunching QSampler.\n\n" "Do you want LinuxSampler to stop?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { bForceServerStop = false; } } // And try to stop server. if (m_pServer && bForceServerStop) { appendMessages(tr("Server is stopping...")); if (m_pServer->state() == QProcess::Running) { #if defined(WIN32) // Try harder... m_pServer->kill(); #else // Try softly... m_pServer->terminate(); #endif } } // Do final processing anyway. else processServerExit(); // Give it some time to terminate gracefully and stabilize... QTime t; t.start(); while (t.elapsed() < QSAMPLER_TIMER_MSECS) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Stdout handler... void MainForm::readServerStdout (void) { if (m_pMessages) m_pMessages->appendStdoutBuffer(m_pServer->readAllStandardOutput()); } // Linuxsampler server cleanup. void MainForm::processServerExit (void) { // Force client code cleanup. stopClient(); // Flush anything that maybe pending... if (m_pMessages) m_pMessages->flushStdoutBuffer(); if (m_pServer && bForceServerStop) { if (m_pServer->state() != QProcess::NotRunning) { appendMessages(tr("Server is being forced...")); // Force final server shutdown... m_pServer->kill(); // Give it some time to terminate gracefully and stabilize... QTime t; t.start(); while (t.elapsed() < QSAMPLER_TIMER_MSECS) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Force final server shutdown... appendMessages( tr("Server was stopped with exit status %1.") .arg(m_pServer->exitStatus())); delete m_pServer; m_pServer = NULL; } // Again, make status visible stable. stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Client stuff. // The LSCP client callback procedure. lscp_status_t qsampler_client_callback ( lscp_client_t */*pClient*/, lscp_event_t event, const char *pchData, int cchData, void *pvData ) { MainForm* pMainForm = (MainForm *) pvData; if (pMainForm == NULL) return LSCP_FAILED; // ATTN: DO NOT EVER call any GUI code here, // as this is run under some other thread context. // A custom event must be posted here... QApplication::postEvent(pMainForm, new CustomEvent(event, pchData, cchData)); return LSCP_OK; } // Start our almighty client... bool MainForm::startClient (void) { // Have it a setup? if (m_pOptions == NULL) return false; // Aren't we already started, are we? if (m_pClient) return true; // Log prepare here. appendMessages(tr("Client connecting...")); // Create the client handle... m_pClient = ::lscp_client_create( m_pOptions->sServerHost.toUtf8().constData(), m_pOptions->iServerPort, qsampler_client_callback, this); if (m_pClient == NULL) { // Is this the first try? // maybe we need to start a local server... if ((m_pServer && m_pServer->state() == QProcess::Running) || !m_pOptions->bServerStart) { appendMessagesError( tr("Could not connect to server as client.\n\nSorry.")); } else { startServer(); } // This is always a failure. stabilizeForm(); return false; } // Just set receive timeout value, blindly. ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); appendMessages( tr("Client receive timeout is set to %1 msec.") .arg(::lscp_client_get_timeout(m_pClient))); // Subscribe to channel info change notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_INFO)"); DeviceStatusForm::onDevicesChanged(); // initialize updateViewMidiDeviceStatusMenu(); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_INFO)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); #if CONFIG_EVENT_CHANNEL_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); #endif #if CONFIG_EVENT_DEVICE_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); #endif // We may stop scheduling around. stopSchedule(); // We'll accept drops from now on... setAcceptDrops(true); // Log success here. appendMessages(tr("Client connected.")); // Hard-notify instrumnet and device configuration forms, // if visible, that we're ready... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); // Is any session pending to be loaded? if (!m_pOptions->sSessionFile.isEmpty()) { // Just load the prabably startup session... if (loadSessionFile(m_pOptions->sSessionFile)) { m_pOptions->sSessionFile = QString::null; return true; } } // send the current / loaded fine tuning settings to the sampler m_pOptions->sendFineTuningSettings(); // Make a new session return newSession(); } // Stop client... void MainForm::stopClient (void) { if (m_pClient == NULL) return; // Log prepare here. appendMessages(tr("Client disconnecting...")); // Clear timer counters... stopSchedule(); // We'll reject drops from now on... setAcceptDrops(false); // Force any channel strips around, but // but avoid removing the corresponding // channels from the back-end server. m_iDirtyCount = 0; closeSession(false); // Close us as a client... #if CONFIG_EVENT_DEVICE_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); #endif #if CONFIG_EVENT_CHANNEL_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); #endif ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_COUNT); ::lscp_client_destroy(m_pClient); m_pClient = NULL; // Hard-notify instrumnet and device configuration forms, // if visible, that we're running out... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); // Log final here. appendMessages(tr("Client disconnected.")); // Make visible status. stabilizeForm(); } // Channel strip activation/selection. void MainForm::activateStrip ( QWidget *pWidget ) { ChannelStrip *pChannelStrip = static_cast (pWidget); if (pChannelStrip) pChannelStrip->setSelected(true); stabilizeForm(); } } // namespace QSampler // end of qsamplerMainForm.cpp qsampler-0.2.2/src/qsamplerDeviceStatusForm.cpp0000644000175000017500000001345510765526350021527 0ustar alessioalessio// qsamplerDeviceStatusForm.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerDeviceStatusForm.h" #include "qsamplerMainForm.h" #include #define MIDI_OFF_COLOR Qt::darkGreen #define MIDI_ON_COLOR Qt::green namespace QSampler { //------------------------------------------------------------------------- // QSampler::MidiActivityLED -- Graphical indicator for MIDI activity. // MidiActivityLED::MidiActivityLED(QString text, QWidget* parent) : QLabel(text, parent) { #if CONFIG_EVENT_DEVICE_MIDI setPalette(MIDI_OFF_COLOR); setAutoFillBackground(true); #else setText("X"); setToolTip("MIDI Activity Disabled\n(at compile time)"); #endif timer.setSingleShot(true); QObject::connect( &timer, SIGNAL(timeout()), this, SLOT(midiDataCeased()) ); } void MidiActivityLED::midiDataArrived() { #if CONFIG_EVENT_DEVICE_MIDI setPalette(MIDI_ON_COLOR); timer.start(50); #endif } void MidiActivityLED::midiDataCeased() { #if CONFIG_EVENT_DEVICE_MIDI setPalette(MIDI_OFF_COLOR); #endif } //------------------------------------------------------------------------- // QSampler::DeviceStatusForm -- Device status informations window. // std::map DeviceStatusForm::instances; DeviceStatusForm::DeviceStatusForm ( int DeviceID, QWidget* pParent, Qt::WindowFlags wflags ) : QMainWindow(pParent, wflags) { m_pDevice = new Device(Device::Midi, DeviceID); if (!centralWidget()) setCentralWidget(new QWidget(this)); QGridLayout* pLayout = new QGridLayout(centralWidget()); centralWidget()->setLayout(pLayout); updateGUIPorts(); // build the GUI m_pVisibleAction = new QAction(this); m_pVisibleAction->setCheckable(true); m_pVisibleAction->setChecked(false); m_pVisibleAction->setText(m_pDevice->deviceName()); m_pVisibleAction->setToolTip( QString("MIDI Device ID: ") + QString::number(m_pDevice->deviceID()) ); QObject::connect( m_pVisibleAction, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)) ); setWindowTitle(m_pDevice->deviceName() + " Status"); } void DeviceStatusForm::updateGUIPorts() { // refresh device informations m_pDevice->setDevice(m_pDevice->deviceType(), m_pDevice->deviceID()); DevicePortList ports = m_pDevice->ports(); // clear the GUI QGridLayout* pLayout = (QGridLayout*) centralWidget()->layout(); for (int i = pLayout->count() - 1; i >= 0; --i) { QLayoutItem* pItem = pLayout->itemAt(i); if (!pItem) continue; pLayout->removeItem(pItem); if (pItem->widget()) delete pItem->widget(); delete pItem; } midiActivityLEDs.clear(); // rebuild the GUI for (int i = 0; i < ports.size(); ++i) { QLabel* pLabel = new QLabel(QString("MIDI port \"") + ports[i]->portName() + "\": "); pLabel->setToolTip(QString("Device ID ") + QString::number(ports[i]->portID())); pLayout->addWidget(pLabel, i, 0, Qt::AlignLeft); MidiActivityLED* pLED = new MidiActivityLED(); midiActivityLEDs.push_back(pLED); pLayout->addWidget(pLED, i, 1); } } DeviceStatusForm::~DeviceStatusForm() { if (m_pDevice) delete m_pDevice; } QAction* DeviceStatusForm::visibleAction() { return m_pVisibleAction; } void DeviceStatusForm::closeEvent(QCloseEvent* event) { m_pVisibleAction->setChecked(false); event->accept(); } void DeviceStatusForm::midiArrived(int iPort) { if (uint(iPort) >= midiActivityLEDs.size()) return; midiActivityLEDs[iPort]->midiDataArrived(); } DeviceStatusForm* DeviceStatusForm::getInstance(int iDeviceID) { std::map::iterator iter = instances.find(iDeviceID); return (iter != instances.end()) ? iter->second : NULL; } const std::map& DeviceStatusForm::getInstances() { return instances; } void DeviceStatusForm::deleteAllInstances() { for ( std::map::iterator iter = instances.begin(); iter != instances.end(); ++iter ) { iter->second->hide(); delete iter->second; } instances.clear(); } void DeviceStatusForm::onDevicesChanged() { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm && pMainForm->client()) { std::set deviceIDs = Device::getDeviceIDs(pMainForm->client(), Device::Midi); // hide and delete status forms whose device has been destroyed for ( std::map::iterator iter = instances.begin(); iter != instances.end(); ++iter ) { if (deviceIDs.find(iter->first) == deviceIDs.end()) { iter->second->hide(); delete iter->second; instances.erase(iter); } } // create status forms for new devices for ( std::set::iterator iter = deviceIDs.begin(); iter != deviceIDs.end(); ++iter ) { if (instances.find(*iter) == instances.end()) { DeviceStatusForm* pStatusForm = new DeviceStatusForm(*iter); instances[*iter] = pStatusForm; } } } } void DeviceStatusForm::onDeviceChanged(int iDeviceID) { DeviceStatusForm* pForm = DeviceStatusForm::getInstance(iDeviceID); if (!pForm) return; pForm->updateGUIPorts(); } } // namespace QSampler // end of qsamplerDeviceStatusForm.cpp qsampler-0.2.2/src/qsamplerInstrumentListForm.h0000644000175000017500000000423111147243071021554 0ustar alessioalessio// qsamplerInstrumentListForm.h // /**************************************************************************** Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentListForm_h #define __qsamplerInstrumentListForm_h #include "ui_qsamplerInstrumentListForm.h" #include "qsamplerInstrumentList.h" class QComboBox; namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentListForm -- Instrument map list form interface. // class InstrumentListForm : public QMainWindow { Q_OBJECT public: InstrumentListForm(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~InstrumentListForm(); public slots: void editInstrument(); void editInstrument(const QModelIndex& index); void newInstrument(); void deleteInstrument(); void refreshInstruments(); void activateMap(int); void stabilizeForm(); // Handle custom context menu here... void contextMenu(const QPoint& pos); protected: void showEvent(QShowEvent *); void hideEvent(QHideEvent *); void closeEvent(QCloseEvent *); private: Ui::qsamplerInstrumentListForm m_ui; MidiInstrumentsModel m_model; MidiInstrumentsDelegate m_delegate; QComboBox* m_pMapComboBox; }; } // namespace QSampler #endif // __qsamplerInstrumentListForm_h // end of qsamplerInstrumentListForm.h qsampler-0.2.2/src/qsamplerChannelForm.ui0000644000175000017500000005571511147243071020323 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2005-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerChannelForm 0 0 460 320 7 1 0 0 Qt::StrongFocus Qsampler: Channel :/icons/qsamplerChannel.png 9 6 0 6 0 0 0 0 24 24 26 26 Qt::TabFocus Browse for instrument filename :/icons/fileOpen.png 7 0 0 0 320 0 Instrument name &Engine: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false EngineNameComboBox 7 0 0 0 Engine name &Filename: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentFileComboBox &Instrument: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentNrComboBox 7 0 0 0 320 0 Instrument filename true MIDI / Input 9 6 0 4 7 0 0 0 MIDI input device 0 0 0 0 24 24 26 26 Qt::TabFocus MIDI input device setup :/icons/midi1.png &Map: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiMapComboBox &Device: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiDeviceComboBox 0 4 7 0 0 0 Instrument map Qt::Horizontal QSizePolicy::Expanding 160 20 &Type: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiDriverComboBox 0 4 5 0 0 0 MIDI input driver type Qt::Horizontal QSizePolicy::Expanding 20 20 &Port: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiPortSpinBox MIDI input port number &Channel: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiChannelComboBox MIDI input channel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 All Audio / Output 9 6 0 6 0 4 7 0 0 0 Audio output device 0 0 0 0 24 24 26 26 Qt::TabFocus Audio output device setup :/icons/audio1.png &Device: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioDeviceComboBox 0 4 5 0 0 0 Audio output driver type Qt::Horizontal QSizePolicy::Expanding 20 20 &Type: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioDriverComboBox 7 7 0 0 Audio routing table 320 80 0 4 Qt::Horizontal QSizePolicy::Expanding 8 8 OK :/icons/formAccept.png Cancel :/icons/formReject.png EngineNameComboBox InstrumentFileComboBox InstrumentFileToolButton InstrumentNrComboBox OkPushButton CancelPushButton qsampler-0.2.2/src/qsamplerAbout.h0000644000175000017500000000301610721015240016766 0ustar alessioalessio// qsamplerAbout.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerAbout_h #define __qsamplerAbout_h #include "config.h" #define QSAMPLER_TITLE PACKAGE_NAME #define QSAMPLER_VERSION PACKAGE_VERSION #define QSAMPLER_SUBTITLE "A LinuxSampler Qt GUI Interface" #define QSAMPLER_WEBSITE "http://qsampler.sourceforge.net" #define QSAMPLER_COPYRIGHT "Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved." #define QSAMPLER_COPYRIGHT2 "Copyright (C) 2007, Christian Schoenebeck" #define QSAMPLER_DOMAIN "linuxsampler.org" #endif // __qsamplerAbout_h // end of qsamplerAbout.h qsampler-0.2.2/src/qsamplerInstrumentList.h0000644000175000017500000000645310725741145020746 0ustar alessioalessio// qsamplerInstrumentList.h // /**************************************************************************** Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentList_h #define __qsamplerInstrumentList_h #include #include #include #include "qsamplerInstrument.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::MidiInstrumentsModel - data model for MIDI prog mappings // (used for QTableView) class MidiInstrumentsModel : public QAbstractTableModel { Q_OBJECT public: MidiInstrumentsModel(QObject* pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent) const; int columnCount(const QModelIndex& parent) const; QVariant data(const QModelIndex& index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; // Make the following method public QAbstractTableModel::reset; // Own methods Instrument* addInstrument(int iMap = 0, int iBank = -1, int iProg = -1); void removeInstrument(const Instrument& instrument); void resort(const Instrument& instrument); // Map selector. void setMidiMap(int iMidiMap); int midiMap() const; signals: // Instrument map/session change signal. void instrumentsChanged(); public slots: // General reloader. void refresh(); private: typedef QMap > InstrumentsMap; InstrumentsMap m_instruments; // Current map selection. int m_iMidiMap; }; //------------------------------------------------------------------------- // QSampler::MidiInstrumentsDelegate - table cell renderer for MIDI prog // mappings (doesn't actually do anything ATM, but is already there for // a future cell editor widget implementation) class MidiInstrumentsDelegate : public QItemDelegate { Q_OBJECT public: MidiInstrumentsDelegate(QObject *pParent = NULL); QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *pEditor, const QModelIndex& index) const; void setModelData(QWidget *pEditor, QAbstractItemModel* model, const QModelIndex& index) const; void updateEditorGeometry(QWidget* pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; } // namespace QSampler #endif // __qsamplerInstrumentList_h // end of qsamplerInstrumentList.h qsampler-0.2.2/src/qsamplerChannel.cpp0000644000175000017500000006516610752101751017644 0ustar alessioalessio// qsamplerChannel.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerChannel.h" #include "qsamplerUtilities.h" #include "qsamplerMainForm.h" #include "qsamplerChannelForm.h" #include #include #ifdef CONFIG_LIBGIG #include "gig.h" #endif namespace QSampler { #define QSAMPLER_INSTRUMENT_MAX 100 #define UNICODE_RIGHT_ARROW QChar(char(0x92), char(0x21)) //------------------------------------------------------------------------- // QSampler::Channel - Sampler channel structure. // // Constructor. Channel::Channel ( int iChannelID ) { m_iChannelID = iChannelID; // m_sEngineName = noEngineName(); // m_sInstrumentName = noInstrumentName(); // m_sInstrumentFile = m_sInstrumentName; m_iInstrumentNr = -1; m_iInstrumentStatus = -1; m_sMidiDriver = "ALSA"; m_iMidiDevice = -1; m_iMidiPort = -1; m_iMidiChannel = -1; m_iMidiMap = -1; m_sAudioDriver = "ALSA"; m_iAudioDevice = -1; m_fVolume = 0.0f; m_bMute = false; m_bSolo = false; } // Default destructor. Channel::~Channel (void) { } // Create a new sampler channel, if not already. bool Channel::addChannel (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Are we a new channel? if (m_iChannelID < 0) { m_iChannelID = ::lscp_add_channel(pMainForm->client()); if (m_iChannelID < 0) { appendMessagesClient("lscp_add_channel"); appendMessagesError( QObject::tr("Could not add channel.\n\nSorry.")); } // Otherwise it's created... else appendMessages(QObject::tr("added.")); } // Return whether we're a valid channel... return (m_iChannelID >= 0); } // Remove sampler channel. bool Channel::removeChannel (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Are we an existing channel? if (m_iChannelID >= 0) { if (::lscp_remove_channel(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_remove_channel"); appendMessagesError(QObject::tr("Could not remove channel.\n\nSorry.")); } else { // Otherwise it's removed. appendMessages(QObject::tr("removed.")); m_iChannelID = -1; } } // Return whether we've removed the channel... return (m_iChannelID < 0); } // Channel-ID (aka Sammpler-Channel) accessors. int Channel::channelID (void) const { return m_iChannelID; } void Channel::setChannelID ( int iChannelID ) { m_iChannelID = iChannelID; } // Readable channel name. QString Channel::channelName (void) const { return (m_iChannelID < 0 ? QObject::tr("New Channel") : QObject::tr("Channel %1").arg(m_iChannelID)); } // Engine name accessors. const QString& Channel::engineName (void) const { return m_sEngineName; } bool Channel::loadEngine ( const QString& sEngineName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sEngineName == sEngineName) return true; if (::lscp_load_engine(pMainForm->client(), sEngineName.toUtf8().constData(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_load_engine"); return false; } appendMessages(QObject::tr("Engine: %1.").arg(sEngineName)); m_sEngineName = sEngineName; return true; } // Instrument filename accessor. const QString& Channel::instrumentFile (void) const { return m_sInstrumentFile; } // Instrument index accessor. int Channel::instrumentNr (void) const { return m_iInstrumentNr; } // Instrument name accessor. const QString& Channel::instrumentName (void) const { return m_sInstrumentName; } // Instrument status accessor. int Channel::instrumentStatus (void) const { return m_iInstrumentStatus; } // Instrument file loader. bool Channel::loadInstrument ( const QString& sInstrumentFile, int iInstrumentNr ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (!isInstrumentFile(sInstrumentFile)) return false; if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr) return true; if ( ::lscp_load_instrument_non_modal( pMainForm->client(), qsamplerUtilities::lscpEscapePath( sInstrumentFile).toUtf8().constData(), iInstrumentNr, m_iChannelID ) != LSCP_OK ) { appendMessagesClient("lscp_load_instrument"); return false; } appendMessages(QObject::tr("Instrument: \"%1\" (%2).") .arg(sInstrumentFile).arg(iInstrumentNr)); return setInstrument(sInstrumentFile, iInstrumentNr); } // Special instrument file/name/number settler. bool Channel::setInstrument ( const QString& sInstrumentFile, int iInstrumentNr ) { m_sInstrumentFile = sInstrumentFile; m_iInstrumentNr = iInstrumentNr; #ifdef CONFIG_INSTRUMENT_NAME m_sInstrumentName = QString::null; // We'll get it, maybe later, on channel_info... #else m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true); #endif m_iInstrumentStatus = 0; return true; } // MIDI driver type accessors (DEPRECATED). const QString& Channel::midiDriver (void) const { return m_sMidiDriver; } bool Channel::setMidiDriver ( const QString& sMidiDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sMidiDriver == sMidiDriver) return true; if (::lscp_set_channel_midi_type(pMainForm->client(), m_iChannelID, sMidiDriver.toUtf8().constData()) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_type"); return false; } appendMessages(QObject::tr("MIDI driver: %1.").arg(sMidiDriver)); m_sMidiDriver = sMidiDriver; return true; } // MIDI device accessors. int Channel::midiDevice (void) const { return m_iMidiDevice; } bool Channel::setMidiDevice ( int iMidiDevice ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiDevice == iMidiDevice) return true; if (::lscp_set_channel_midi_device(pMainForm->client(), m_iChannelID, iMidiDevice) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_device"); return false; } appendMessages(QObject::tr("MIDI device: %1.").arg(iMidiDevice)); m_iMidiDevice = iMidiDevice; return true; } // MIDI port number accessor. int Channel::midiPort (void) const { return m_iMidiPort; } bool Channel::setMidiPort ( int iMidiPort ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiPort == iMidiPort) return true; if (::lscp_set_channel_midi_port(pMainForm->client(), m_iChannelID, iMidiPort) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_port"); return false; } appendMessages(QObject::tr("MIDI port: %1.").arg(iMidiPort)); m_iMidiPort = iMidiPort; return true; } // MIDI channel accessor. int Channel::midiChannel (void) const { return m_iMidiChannel; } bool Channel::setMidiChannel ( int iMidiChannel ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiChannel == iMidiChannel) return true; if (::lscp_set_channel_midi_channel(pMainForm->client(), m_iChannelID, iMidiChannel) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_channel"); return false; } appendMessages(QObject::tr("MIDI channel: %1.").arg(iMidiChannel)); m_iMidiChannel = iMidiChannel; return true; } // MIDI instrument map accessor. int Channel::midiMap (void) const { return m_iMidiMap; } bool Channel::setMidiMap ( int iMidiMap ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiMap == iMidiMap) return true; #ifdef CONFIG_MIDI_INSTRUMENT if (::lscp_set_channel_midi_map(pMainForm->client(), m_iChannelID, iMidiMap) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_map"); return false; } #endif appendMessages(QObject::tr("MIDI map: %1.").arg(iMidiMap)); m_iMidiMap = iMidiMap; return true; } // Audio device accessor. int Channel::audioDevice (void) const { return m_iAudioDevice; } bool Channel::setAudioDevice ( int iAudioDevice ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iAudioDevice == iAudioDevice) return true; if (::lscp_set_channel_audio_device(pMainForm->client(), m_iChannelID, iAudioDevice) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_device"); return false; } appendMessages(QObject::tr("Audio device: %1.").arg(iAudioDevice)); m_iAudioDevice = iAudioDevice; return true; } // Audio driver type accessors (DEPRECATED). const QString& Channel::audioDriver (void) const { return m_sAudioDriver; } bool Channel::setAudioDriver ( const QString& sAudioDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sAudioDriver == sAudioDriver) return true; if (::lscp_set_channel_audio_type(pMainForm->client(), m_iChannelID, sAudioDriver.toUtf8().constData()) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_type"); return false; } appendMessages(QObject::tr("Audio driver: %1.").arg(sAudioDriver)); m_sAudioDriver = sAudioDriver; return true; } // Channel volume accessors. float Channel::volume (void) const { return m_fVolume; } bool Channel::setVolume ( float fVolume ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_fVolume == fVolume) return true; if (::lscp_set_channel_volume(pMainForm->client(), m_iChannelID, fVolume) != LSCP_OK) { appendMessagesClient("lscp_set_channel_volume"); return false; } appendMessages(QObject::tr("Volume: %1.").arg(fVolume)); m_fVolume = fVolume; return true; } // Sampler channel mute state. bool Channel::channelMute (void) const { return m_bMute; } bool Channel::setChannelMute ( bool bMute ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && ((m_bMute && bMute) || (!m_bMute && !bMute))) return true; #ifdef CONFIG_MUTE_SOLO if (::lscp_set_channel_mute(pMainForm->client(), m_iChannelID, bMute) != LSCP_OK) { appendMessagesClient("lscp_set_channel_mute"); return false; } appendMessages(QObject::tr("Mute: %1.").arg((int) bMute)); m_bMute = bMute; return true; #else return false; #endif } // Sampler channel solo state. bool Channel::channelSolo (void) const { return m_bSolo; } bool Channel::setChannelSolo ( bool bSolo ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && ((m_bSolo && bSolo) || (!m_bSolo && !bSolo))) return true; #ifdef CONFIG_MUTE_SOLO if (::lscp_set_channel_solo(pMainForm->client(), m_iChannelID, bSolo) != LSCP_OK) { appendMessagesClient("lscp_set_channel_solo"); return false; } appendMessages(QObject::tr("Solo: %1.").arg((int) bSolo)); m_bSolo = bSolo; return true; #else return false; #endif } // Audio routing accessors. int Channel::audioChannel ( int iAudioOut ) const { return m_audioRouting[iAudioOut]; } bool Channel::setAudioChannel ( int iAudioOut, int iAudioIn ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_audioRouting[iAudioOut] == iAudioIn) return true; if (::lscp_set_channel_audio_channel(pMainForm->client(), m_iChannelID, iAudioOut, iAudioIn) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_channel"); return false; } appendMessages(QObject::tr("Audio Channel: %1 -> %2.") .arg(iAudioOut).arg(iAudioIn)); m_audioRouting[iAudioOut] = iAudioIn; return true; } // The audio routing map itself. const ChannelRoutingMap& Channel::audioRouting (void) const { return m_audioRouting; } // Istrument name remapper. void Channel::updateInstrumentName (void) { #ifndef CONFIG_INSTRUMENT_NAME m_sInstrumentName = getInstrumentName(m_sInstrumentFile, m_iInstrumentNr, (options() && options()->bInstrumentNames)); #endif } // Update whole channel info state. bool Channel::updateChannelInfo (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; // Read channel information. lscp_channel_info_t *pChannelInfo = ::lscp_get_channel_info(pMainForm->client(), m_iChannelID); if (pChannelInfo == NULL) { appendMessagesClient("lscp_get_channel_info"); appendMessagesError(QObject::tr("Could not get channel information.\n\nSorry.")); return false; } #ifdef CONFIG_INSTRUMENT_NAME // We got all actual instrument datum... m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix(pChannelInfo->instrument_file); m_iInstrumentNr = pChannelInfo->instrument_nr; m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw(pChannelInfo->instrument_name); #else // First, check if intrument name has changed, // taking care that instrument name lookup might be expensive, // so we better make it only once and when really needed... if ((m_sInstrumentFile != pChannelInfo->instrument_file) || (m_iInstrumentNr != pChannelInfo->instrument_nr)) { m_sInstrumentFile = pChannelInfo->instrument_file; m_iInstrumentNr = pChannelInfo->instrument_nr; updateInstrumentName(); } #endif // Cache in other channel information. m_sEngineName = pChannelInfo->engine_name; m_iInstrumentStatus = pChannelInfo->instrument_status; m_iMidiDevice = pChannelInfo->midi_device; m_iMidiPort = pChannelInfo->midi_port; m_iMidiChannel = pChannelInfo->midi_channel; #ifdef CONFIG_MIDI_INSTRUMENT m_iMidiMap = pChannelInfo->midi_map; #endif m_iAudioDevice = pChannelInfo->audio_device; m_fVolume = pChannelInfo->volume; #ifdef CONFIG_MUTE_SOLO m_bMute = pChannelInfo->mute; m_bSolo = pChannelInfo->solo; #endif // Some sanity checks. if (m_sEngineName == "NONE" || m_sEngineName.isEmpty()) m_sEngineName = QString::null; if (m_sInstrumentFile == "NONE" || m_sInstrumentFile.isEmpty()) { m_sInstrumentFile = QString::null; m_sInstrumentName = QString::null; } // Time for device info grabbing... lscp_device_info_t *pDeviceInfo; const QString sNone = QObject::tr("(none)"); // Audio device driver type. pDeviceInfo = ::lscp_get_audio_device_info(pMainForm->client(), m_iAudioDevice); if (pDeviceInfo == NULL) { appendMessagesClient("lscp_get_audio_device_info"); m_sAudioDriver = sNone; } else { m_sAudioDriver = pDeviceInfo->driver; } // MIDI device driver type. pDeviceInfo = ::lscp_get_midi_device_info(pMainForm->client(), m_iMidiDevice); if (pDeviceInfo == NULL) { appendMessagesClient("lscp_get_midi_device_info"); m_sMidiDriver = sNone; } else { m_sMidiDriver = pDeviceInfo->driver; } // Set the audio routing map. m_audioRouting.clear(); #ifdef CONFIG_AUDIO_ROUTING int *piAudioRouting = pChannelInfo->audio_routing; for (int i = 0; piAudioRouting && piAudioRouting[i] >= 0; i++) m_audioRouting[i] = piAudioRouting[i]; #else char **ppszAudioRouting = pChannelInfo->audio_routing; for (int i = 0; ppszAudioRouting && ppszAudioRouting[i]; i++) m_audioRouting[i] = ::atoi(ppszAudioRouting[i]); #endif return true; } // Reset channel method. bool Channel::channelReset (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (::lscp_reset_channel(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_reset_channel"); return false; } appendMessages(QObject::tr("reset.")); return true; } // Spawn instrument editor method. bool Channel::editChannel (void) { #ifdef CONFIG_EDIT_INSTRUMENT MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (::lscp_edit_channel_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_edit_channel_instrument"); appendMessagesError(QObject::tr( "Could not launch an appropriate instrument editor " "for the given instrument!\n\n" "Make sure you have an appropriate " "instrument editor like 'gigedit' installed " "and that it placed its mandatory DLL file " "into the sampler's plugin directory.") ); return false; } appendMessages(QObject::tr("edit instrument.")); return true; #else appendMessagesError(QObject::tr( "Sorry, QSampler was compiled for a version of liblscp " "which lacks this feature.\n\n" "You may want to update liblscp and recompile QSampler afterwards.") ); return false; #endif } // Channel setup dialog form. bool Channel::channelSetup ( QWidget *pParent ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; bool bResult = false; appendMessages(QObject::tr("setup...")); ChannelForm *pChannelForm = new ChannelForm(pParent); if (pChannelForm) { pChannelForm->setup(this); bResult = pChannelForm->exec(); delete pChannelForm; } return bResult; } // Redirected messages output methods. void Channel::appendMessages( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessages(channelName() + ' ' + s); } void Channel::appendMessagesColor( const QString& s, const QString& c ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesColor(channelName() + ' ' + s, c); } void Channel::appendMessagesText( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesText(channelName() + ' ' + s); } void Channel::appendMessagesError( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesError(channelName() + "\n\n" + s); } void Channel::appendMessagesClient( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesClient(channelName() + ' ' + s); } // Context menu event handler. void Channel::contextMenuEvent( QContextMenuEvent *pEvent ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->contextMenuEvent(pEvent); } // FIXME: Check whether a given file is an instrument file. bool Channel::isInstrumentFile ( const QString& sInstrumentFile ) { bool bResult = false; QFile file(sInstrumentFile); if (file.open(QIODevice::ReadOnly)) { char achHeader[16]; if (file.read(achHeader, 16) > 0) { bResult = (::memcmp(&achHeader[0], "RIFF", 4) == 0 && ::memcmp(&achHeader[8], "DLS LIST", 8) == 0); } file.close(); } return bResult; } // Retrieve the instrument list of a instrument file (.gig). QStringList Channel::getInstrumentList( const QString& sInstrumentFile, bool bInstrumentNames ) { QString sInstrumentName = QFileInfo(sInstrumentFile).fileName(); QStringList instlist; if (isInstrumentFile(sInstrumentFile)) { #ifdef CONFIG_LIBGIG if (bInstrumentNames) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); gig::File *pGig = new gig::File(pRiff); #if HAVE_LIBGIG_SETAUTOLOAD // prevent sleepy response time on large .gig files pGig->SetAutoLoad(false); #endif gig::Instrument *pInstrument = pGig->GetFirstInstrument(); while (pInstrument) { instlist.append((pInstrument->pInfo)->Name.c_str()); pInstrument = pGig->GetNextInstrument(); } delete pGig; delete pRiff; } else #endif for (int iInstrumentNr = 0; iInstrumentNr < QSAMPLER_INSTRUMENT_MAX; iInstrumentNr++) instlist.append(sInstrumentName + " [" + QString::number(iInstrumentNr) + "]"); } else instlist.append(noInstrumentName()); return instlist; } // Retrieve the spacific instrument name of a instrument file (.gig), given its index. QString Channel::getInstrumentName( const QString& sInstrumentFile, int iInstrumentNr, bool bInstrumentNames ) { QString sInstrumentName; if (isInstrumentFile(sInstrumentFile)) { sInstrumentName = QFileInfo(sInstrumentFile).fileName(); #ifdef CONFIG_LIBGIG if (bInstrumentNames) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); gig::File *pGig = new gig::File(pRiff); #if HAVE_LIBGIG_SETAUTOLOAD // prevent sleepy response time on large .gig files pGig->SetAutoLoad(false); #endif int iIndex = 0; gig::Instrument *pInstrument = pGig->GetFirstInstrument(); while (pInstrument) { if (iIndex == iInstrumentNr) { sInstrumentName = (pInstrument->pInfo)->Name.c_str(); break; } iIndex++; pInstrument = pGig->GetNextInstrument(); } delete pGig; delete pRiff; } else #endif sInstrumentName += " [" + QString::number(iInstrumentNr) + "]"; } else sInstrumentName = noInstrumentName(); return sInstrumentName; } // Common invalid name-helpers. QString Channel::noEngineName (void) { return QObject::tr("(No engine)"); } QString Channel::noInstrumentName (void) { return QObject::tr("(No instrument)"); } QString Channel::loadingInstrument (void) { return QObject::tr("(Loading instrument...)"); } //------------------------------------------------------------------------- // QSampler::ChannelRoutingModel - data model for audio routing // (used for QTableView) ChannelRoutingModel::ChannelRoutingModel ( QObject *pParent ) : QAbstractTableModel(pParent), m_pDevice(NULL) { } int ChannelRoutingModel::rowCount ( const QModelIndex& /*parent*/) const { return (m_pDevice) ? m_routing.size() : 0; } int ChannelRoutingModel::columnCount ( const QModelIndex& /*parent*/) const { return 1; } Qt::ItemFlags ChannelRoutingModel::flags ( const QModelIndex& /*index*/) const { return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled; } bool ChannelRoutingModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; m_routing[index.row()] = value.toInt(); emit dataChanged(index, index); return true; } QVariant ChannelRoutingModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); if (index.column() != 0) return QVariant(); ChannelRoutingItem item; // The common device port item list. DevicePortList& ports = m_pDevice->ports(); QListIterator iter(ports); while (iter.hasNext()) { DevicePort *pPort = iter.next(); item.options.append( m_pDevice->deviceTypeName() + ' ' + m_pDevice->driverName() + ' ' + pPort->portName() ); } item.selection = m_routing[index.row()]; return QVariant::fromValue(item); } QVariant ChannelRoutingModel::headerData ( int section, Qt::Orientation orientation, int role) const { if (role != Qt::DisplayRole) return QVariant(); switch (orientation) { case Qt::Horizontal: return UNICODE_RIGHT_ARROW + QObject::tr(" Device Channel"); case Qt::Vertical: return QObject::tr("Audio Channel ") + QString::number(section) + " " + UNICODE_RIGHT_ARROW; default: return QVariant(); } } void ChannelRoutingModel::refresh ( Device *pDevice, const ChannelRoutingMap& routing ) { m_pDevice = pDevice; m_routing = routing; // inform the outer world (QTableView) that our data changed QAbstractTableModel::reset(); } //------------------------------------------------------------------------- // QSampler::ChannelRoutingDelegate - table cell renderer for audio routing // ChannelRoutingDelegate::ChannelRoutingDelegate ( QObject *pParent ) : QItemDelegate(pParent) { } QWidget* ChannelRoutingDelegate::createEditor ( QWidget *pParent, const QStyleOptionViewItem & option, const QModelIndex& index ) const { if (!index.isValid()) return NULL; if (index.column() != 0) return NULL; ChannelRoutingItem item = index.model()->data(index, Qt::DisplayRole).value(); QComboBox* pComboBox = new QComboBox(pParent); pComboBox->addItems(item.options); pComboBox->setCurrentIndex(item.selection); pComboBox->setEnabled(true); pComboBox->setGeometry(option.rect); return pComboBox; } void ChannelRoutingDelegate::setEditorData ( QWidget *pEditor, const QModelIndex &index) const { ChannelRoutingItem item = index.model()->data(index, Qt::DisplayRole).value (); QComboBox* pComboBox = static_cast (pEditor); pComboBox->setCurrentIndex(item.selection); } void ChannelRoutingDelegate::setModelData ( QWidget* pEditor, QAbstractItemModel *pModel, const QModelIndex& index ) const { QComboBox *pComboBox = static_cast (pEditor); pModel->setData(index, pComboBox->currentIndex()); } void ChannelRoutingDelegate::updateEditorGeometry ( QWidget *pEditor, const QStyleOptionViewItem& option, const QModelIndex &/* index */) const { pEditor->setGeometry(option.rect); } } // namespace QSampler // end of qsamplerChannel.cpp qsampler-0.2.2/src/qsamplerOptionsForm.ui0000644000175000017500000013255511147243071020404 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2005-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerOptionsForm 0 0 539 422 Qsampler: Options :/icons/qsampler.png:/icons/qsampler.png true 4 4 4 0 Qt::Horizontal QSizePolicy::Expanding 250 16 OK :/icons/formAccept.png:/icons/formAccept.png Cancel :/icons/formReject.png:/icons/formReject.png false 0 0 0 527 352 &Server 4 8 75 true Settings true 4 4 50 false &Host: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerHostComboBox 60 32767 50 false LinuxSampler server listener port number true 8888 60 32767 50 false &Port: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerPortComboBox 0 0 50 false LinuxSampler server host name or address true localhost 50 false &Command line: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerCmdLineComboBox 50 false Whether to start the LinuxSampler server on local machine &Start server locally Alt+S 0 0 50 false Command line to start LinuxSampler server locally true linuxsampler 50 false Start &delay: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false StartDelaySpinBox 0 0 40 0 50 false Delay time in seconds after server startup secs 1 100 3 Qt::Horizontal QSizePolicy::Expanding 320 16 Qt::Vertical QSizePolicy::Expanding 20 20 Qt::Horizontal QSizePolicy::Expanding 320 16 0 0 40 0 50 false Receive timeout in milliseconds msec 100 60000 100 1000 50 false &Timeout: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerTimeoutSpinBox Qt::Vertical QSizePolicy::Expanding 20 20 75 true Logging true 8 4 0 0 50 false Messages log file true 22 22 24 24 50 false Qt::TabFocus Browse for the messages log file location ... 50 false Whether to activate a messages logging to file. &Messages log file: Alt+M 0 0 527 352 &Tuning 75 true Limits true 50 false Maximum number of voices: 60 0 50 false Maximum number of voices 999999999 Qt::Horizontal 250 20 50 false Maximum number of disk streams: 60 0 50 false Maximum number of disk streams 999999999 Qt::Vertical 20 194 0 0 800 480 &Display 75 true Channels true 4 4 0 0 180 0 180 32767 50 false Sample channel display font display true QFrame::StyledPanel QFrame::Sunken 1 Qt::AlignCenter false 50 false Select font for the channel display &Font... Alt+F false Qt::Horizontal QSizePolicy::Expanding 56 16 50 false Whether to refresh the channels view automatically &Auto refresh: Alt+A 50 false Maximum &volume: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MaxVolumeSpinBox 0 0 50 false Time in milliseconds between each auto-refresh cycle msec 200 20000 100 1000 0 0 50 false Upper limit for the sampler channel volume setting % 1000 10 100 50 false Whether to enable a shiny glass light effect on the channel display Display shiny glass light &effect Alt+E 75 true Messages true 4 4 0 0 180 0 180 32767 50 false Sample messages text font display true QFrame::StyledPanel QFrame::Sunken Qt::AlignCenter false 50 false Select font for the messages text display &Font... Alt+F false Qt::Horizontal QSizePolicy::Expanding 49 16 50 false Whether to keep a maximum number of lines in the messages window &Messages limit: Alt+M 50 false The maximum number of message lines to keep in view lines 100 10000 100 1000 75 true Other true 50 false Whether to ask for confirmation on removals &Confirm removals Alt+C 50 false &Number of recent files: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MaxRecentFilesSpinBox 50 false The maximum number of recent files to keep in menu 0 20 5 50 false Whether to keep all child windows on top of the main window &Keep child windows always on top Alt+K Qt::Horizontal 281 48 50 false Whether to capture standard output (stdout/stderr) into messages window Capture standard &output Alt+O 50 false Whether to show the complete directory path of loaded session files Show complete &path of session files Alt+P 50 false Whether to show the actual instrument names as read from instrument file (using libgig) Show actual &instrument names Alt+I 50 false &Base font size: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter BaseFontSizeComboBox 50 false Base application font size (pt.) true (default) 6 7 8 9 10 11 12 OptionsTabWidget ServerHostComboBox ServerPortComboBox ServerTimeoutSpinBox ServerStartCheckBox ServerCmdLineComboBox StartDelaySpinBox MessagesLogCheckBox MessagesLogPathComboBox MessagesLogPathToolButton DisplayFontPushButton DisplayEffectCheckBox AutoRefreshCheckBox AutoRefreshTimeSpinBox MaxVolumeSpinBox MessagesFontPushButton MessagesLimitCheckBox MessagesLimitLinesSpinBox ConfirmRemoveCheckBox KeepOnTopCheckBox StdoutCaptureCheckBox CompletePathCheckBox InstrumentNamesCheckBox MaxRecentFilesSpinBox BaseFontSizeComboBox OkPushButton CancelPushButton qsampler-0.2.2/src/qsamplerInstrumentForm.ui0000644000175000017500000003434111147243071021113 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerInstrumentForm 0 0 452 226 7 1 0 0 Qt::StrongFocus Qsampler: MIDI Instrument :/icons/qsamplerInstrument.png 4 4 0 4 7 0 0 0 Engine name &Engine: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false EngineNameComboBox &Prog: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ProgSpinBox Program (0-127) 128 1 Vol&ume: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false VolumeSpinBox &Map: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MapComboBox &Bank: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false BankSpinBox Bank (0-16383) 16383 7 0 0 0 320 0 Instrument filename true M&ode: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false LoadModeComboBox Qt::Horizontal QSizePolicy::Expanding 119 8 &Filename: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentFileComboBox &Name: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false NameLineEdit 7 0 0 0 Instrument map &Instrument: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentNrComboBox 7 0 0 0 320 0 Instrument name Volume (%) % 100 Name 7 0 0 0 Load mode Default On Demand On Demand Hold Persistent 0 0 0 0 24 24 26 26 Qt::TabFocus Browse for instrument filename :/icons/fileOpen.png 0 4 Qt::Horizontal QSizePolicy::Expanding 8 8 O&K :/icons/formAccept.png Alt+K C&ancel :/icons/formReject.png Alt+A MapComboBox BankSpinBox ProgSpinBox NameLineEdit EngineNameComboBox InstrumentFileComboBox InstrumentFileToolButton InstrumentNrComboBox VolumeSpinBox LoadModeComboBox OkPushButton CancelPushButton qsampler-0.2.2/src/qsamplerOptionsForm.h0000644000175000017500000000373511147243071020213 0ustar alessioalessio// qsamplerOptionsForm.h // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerOptionsForm_h #define __qsamplerOptionsForm_h #include "ui_qsamplerOptionsForm.h" #include "qsamplerOptions.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::OptionsForm -- Options form interface. // class OptionsForm : public QDialog { Q_OBJECT public: OptionsForm(QWidget *pParent = NULL); ~OptionsForm(); void setup(Options* pOptions); protected slots: void accept(); void reject(); void optionsChanged(); void stabilizeForm(); void browseMessagesLogPath(); void chooseDisplayFont(); void chooseMessagesFont(); void toggleDisplayEffect(bool bOn); void maxVoicesChanged(int iMaxVoices); void maxStreamsChanged(int iMaxStreams); private: Ui::qsamplerOptionsForm m_ui; Options* m_pOptions; int m_iDirtySetup; int m_iDirtyCount; bool bMaxVoicesModified; bool bMaxStreamsModified; }; } // namespace QSampler #endif // __qsamplerOptionsForm_h // end of qsamplerOptionsForm.h qsampler-0.2.2/src/qsamplerFxSendsModel.h0000644000175000017500000000432710752101751020264 0ustar alessioalessio// qsamplerFxSendList.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerFxSendList_h #define __qsamplerFxSendList_h #include #include #include "qsamplerFxSend.h" namespace QSampler { class FxSendsModel : public QAbstractListModel { Q_OBJECT public: FxSendsModel(int SamplerChannelID, QObject* pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent) const; QVariant data(const QModelIndex& index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex& index) const; // Make the following method public QAbstractListModel::reset; // Own methods FxSend* addFxSend(); FxSend* fxSend(const QModelIndex& index); void removeFxSend(const QModelIndex& index); signals: void fxSendsDirtyChanged(bool); public slots: void cleanRefresh(); void applyToSampler(); // not pretty, but more efficient than wiring connections for each element void onExternalModifiication(const QModelIndex& index); private: typedef QList FxSendsList; int m_SamplerChannelID; FxSendsList m_FxSends; }; } // namespace QSampler #endif // __qsamplerFxSendList_h // end of qsamplerFxSendList.h qsampler-0.2.2/src/qsamplerChannelForm.cpp0000644000175000017500000005722511147243071020466 0ustar alessioalessio// qsamplerChannelForm.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerChannelForm.h" #include "qsamplerAbout.h" #include "qsamplerDeviceForm.h" #include "qsamplerMainForm.h" #include "qsamplerInstrument.h" #include #include #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::Channelform -- Channel form implementation. // ChannelForm::ChannelForm ( QWidget* pParent ) : QDialog(pParent) { m_ui.setupUi(this); // Initialize locals. m_pChannel = NULL; m_iDirtySetup = 0; m_iDirtyCount = 0; // m_midiDevices.setAutoDelete(true); // m_audioDevices.setAutoDelete(true); m_pDeviceForm = NULL; int iRowHeight = m_ui.AudioRoutingTable->fontMetrics().height() + 4; m_ui.AudioRoutingTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.AudioRoutingTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.AudioRoutingTable->setModel(&m_routingModel); m_ui.AudioRoutingTable->setItemDelegate(&m_routingDelegate); m_ui.AudioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); // m_ui.AudioRoutingTable->verticalHeader()->hide(); // This goes initially hidden, and will be shown // on setup() for currently existing channels... m_ui.AudioRoutingTable->hide(); // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.EngineNameComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.InstrumentFileComboBox, SIGNAL(activated(const QString&)), SLOT(updateInstrumentName())); QObject::connect(m_ui.InstrumentFileToolButton, SIGNAL(clicked()), SLOT(openInstrumentFile())); QObject::connect(m_ui.InstrumentNrComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiDriverComboBox, SIGNAL(activated(const QString&)), SLOT(selectMidiDriver(const QString&))); QObject::connect(m_ui.MidiDeviceComboBox, SIGNAL(activated(int)), SLOT(selectMidiDevice(int))); QObject::connect(m_ui.MidiPortSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiChannelComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiMapComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.AudioDriverComboBox, SIGNAL(activated(const QString&)), SLOT(selectAudioDriver(const QString&))); QObject::connect(m_ui.AudioDeviceComboBox, SIGNAL(activated(int)), SLOT(selectAudioDevice(int))); QObject::connect(m_ui.OkPushButton, SIGNAL(clicked()), SLOT(accept())); QObject::connect(m_ui.CancelPushButton, SIGNAL(clicked()), SLOT(reject())); QObject::connect(m_ui.MidiDeviceToolButton, SIGNAL(clicked()), SLOT(setupMidiDevice())); QObject::connect(m_ui.AudioDeviceToolButton, SIGNAL(clicked()), SLOT(setupAudioDevice())); QObject::connect(&m_routingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(optionsChanged())); QObject::connect(&m_routingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updateTableCellRenderers(const QModelIndex&, const QModelIndex&))); QObject::connect(&m_routingModel, SIGNAL(modelReset()), SLOT(updateTableCellRenderers())); } ChannelForm::~ChannelForm() { if (m_pDeviceForm) delete m_pDeviceForm; m_pDeviceForm = NULL; qDeleteAll(m_midiDevices); m_midiDevices.clear(); qDeleteAll(m_audioDevices); m_audioDevices.clear(); } // Channel dialog setup formal initializer. void ChannelForm::setup ( Channel *pChannel ) { m_pChannel = pChannel; m_iDirtySetup = 0; m_iDirtyCount = 0; if (m_pChannel == NULL) return; // It can be a brand new channel, remember? const bool bNew = (m_pChannel->channelID() < 0); setWindowTitle(QSAMPLER_TITLE ": " + m_pChannel->channelName()); // Check if we're up and connected. MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Avoid nested changes. m_iDirtySetup++; // Load combo box history... pOptions->loadComboBoxHistory(m_ui.InstrumentFileComboBox); // Populate Engines list. const char **ppszEngines = ::lscp_list_available_engines(pMainForm->client()); if (ppszEngines) { m_ui.EngineNameComboBox->clear(); for (int iEngine = 0; ppszEngines[iEngine]; iEngine++) m_ui.EngineNameComboBox->addItem(QString(ppszEngines[iEngine])); } else m_pChannel->appendMessagesClient("lscp_list_available_engines"); // Populate Audio output type list. m_ui.AudioDriverComboBox->clear(); m_ui.AudioDriverComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), Device::Audio)); // Populate MIDI input type list. m_ui.MidiDriverComboBox->clear(); m_ui.MidiDriverComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), Device::Midi)); // Populate Maps list. m_ui.MidiMapComboBox->clear(); m_ui.MidiMapComboBox->insertItems(0, Instrument::getMapNames()); // Read proper channel information, // and populate the channel form fields. // Engine name... QString sEngineName = pChannel->engineName(); if (sEngineName.isEmpty() || bNew) sEngineName = pOptions->sEngineName; if (sEngineName.isEmpty()) sEngineName = Channel::noEngineName(); if (m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.EngineNameComboBox->addItem(sEngineName); } m_ui.EngineNameComboBox->setCurrentIndex( m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive)); // Instrument filename and index... QString sInstrumentFile = pChannel->instrumentFile(); if (sInstrumentFile.isEmpty()) sInstrumentFile = Channel::noInstrumentName(); m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList(sInstrumentFile, pOptions->bInstrumentNames)); int iInstrumentNr = pChannel->instrumentNr(); if (iInstrumentNr < 0) iInstrumentNr = 0; m_ui.InstrumentNrComboBox->setCurrentIndex(iInstrumentNr); // MIDI input device... Device midiDevice(Device::Midi, m_pChannel->midiDevice()); // MIDI input driver... QString sMidiDriver = midiDevice.driverName(); if (sMidiDriver.isEmpty() || bNew) sMidiDriver = pOptions->sMidiDriver.toUpper(); if (!sMidiDriver.isEmpty()) { if (m_ui.MidiDriverComboBox->findText(sMidiDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.MidiDriverComboBox->insertItem(0, sMidiDriver); } m_ui.MidiDriverComboBox->setCurrentIndex( m_ui.MidiDriverComboBox->findText(sMidiDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) ); } selectMidiDriverItem(sMidiDriver); if (!bNew) { m_ui.MidiDeviceComboBox->setItemText( m_ui.MidiDeviceComboBox->currentIndex(), midiDevice.deviceName()); } selectMidiDeviceItem(m_ui.MidiDeviceComboBox->currentIndex()); // MIDI input port... m_ui.MidiPortSpinBox->setValue(pChannel->midiPort()); // MIDI input channel... int iMidiChannel = pChannel->midiChannel(); // When new, try to suggest a sensible MIDI channel... if (iMidiChannel < 0) iMidiChannel = (::lscp_get_channels(pMainForm->client()) % 16); m_ui.MidiChannelComboBox->setCurrentIndex(iMidiChannel); // MIDI instrument map... int iMidiMap = (bNew ? pOptions->iMidiMap : pChannel->midiMap()); // When new, try to suggest a sensible MIDI map... if (iMidiMap < 0) iMidiMap = 0; const QString& sMapName = Instrument::getMapName(iMidiMap); if (!sMapName.isEmpty()) { m_ui.MidiMapComboBox->setItemText( m_ui.MidiMapComboBox->currentIndex(), sMapName); } // It might be no maps around... bool bMidiMapEnabled = (m_ui.MidiMapComboBox->count() > 0); m_ui.MidiMapTextLabel->setEnabled(bMidiMapEnabled); m_ui.MidiMapComboBox->setEnabled(bMidiMapEnabled); // Audio output device... Device audioDevice(Device::Audio, m_pChannel->audioDevice()); // Audio output driver... QString sAudioDriver = audioDevice.driverName(); if (sAudioDriver.isEmpty() || bNew) sAudioDriver = pOptions->sAudioDriver.toUpper(); if (!sAudioDriver.isEmpty()) { if (m_ui.AudioDriverComboBox->findText(sAudioDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.AudioDriverComboBox->insertItem(0, sAudioDriver); } m_ui.AudioDriverComboBox->setCurrentIndex( m_ui.AudioDriverComboBox->findText(sAudioDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) ); } selectAudioDriverItem(sAudioDriver); if (!bNew) { m_ui.AudioDeviceComboBox->setItemText( m_ui.AudioDeviceComboBox->currentIndex(), audioDevice.deviceName()); } selectAudioDeviceItem(m_ui.AudioDeviceComboBox->currentIndex()); // Let the audio routing table see the light, // if we're editing an existing sampler channel... m_ui.AudioRoutingTable->setVisible(!bNew); const QString sInstrumentNrToolTip = (pOptions->bInstrumentNames) ? "Select an instrument of the file" : "You might want to enable instrument name retrieval in the " "settings dialog"; m_ui.InstrumentNrComboBox->setToolTip( QObject::tr(sInstrumentNrToolTip.toUtf8().data()) ); // As convenient, make it ready on stabilizeForm() for // prompt acceptance, if we got the minimum required... /* if (sEngineName != Channel::noEngineName() && sInstrumentFile != Channel::noInstrumentName()) m_iDirtyCount++; */ // Done. m_iDirtySetup--; stabilizeForm(); } // Accept settings (OK button slot). void ChannelForm::accept (void) { if (m_pChannel == NULL) return; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Flush any pending editing... //m_ui.AudioRoutingTable->flush(); // We'll go for it! if (m_iDirtyCount > 0) { int iErrors = 0; // Are we a new channel? if (!m_pChannel->addChannel()) iErrors++; // Accept Audio driver or device selection... if (m_audioDevices.isEmpty()) { if (!m_pChannel->setAudioDriver(m_ui.AudioDriverComboBox->currentText())) iErrors++; } else { Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); ChannelRoutingMap routingMap = m_routingModel.routingMap(); if (pDevice == NULL) iErrors++; else if (!m_pChannel->setAudioDevice(pDevice->deviceID())) iErrors++; else if (!routingMap.isEmpty()) { // Set the audio route changes... ChannelRoutingMap::ConstIterator iter; for (iter = routingMap.begin(); iter != routingMap.end(); ++iter) { if (!m_pChannel->setAudioChannel(iter.key(), iter.value())) iErrors++; } } } // Accept MIDI driver or device selection... if (m_midiDevices.isEmpty()) { if (!m_pChannel->setMidiDriver(m_ui.MidiDriverComboBox->currentText())) iErrors++; } else { Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice == NULL) iErrors++; else if (!m_pChannel->setMidiDevice(pDevice->deviceID())) iErrors++; } // MIDI input port number... if (!m_pChannel->setMidiPort(m_ui.MidiPortSpinBox->value())) iErrors++; // MIDI input channel... if (!m_pChannel->setMidiChannel(m_ui.MidiChannelComboBox->currentIndex())) iErrors++; // Engine name... if (!m_pChannel->loadEngine(m_ui.EngineNameComboBox->currentText())) iErrors++; // Instrument file and index... const QString& sPath = m_ui.InstrumentFileComboBox->currentText(); if (!sPath.isEmpty() && QFileInfo(sPath).exists()) { if (!m_pChannel->loadInstrument(sPath, m_ui.InstrumentNrComboBox->currentIndex())) iErrors++; } // MIDI intrument map... if (!m_pChannel->setMidiMap(m_ui.MidiMapComboBox->currentIndex())) iErrors++; // Show error messages? if (iErrors > 0) { m_pChannel->appendMessagesError( tr("Some channel settings could not be set.\n\nSorry.")); } } // Save default engine name, instrument directory and history... pOptions->sInstrumentDir = QFileInfo( m_ui.InstrumentFileComboBox->currentText()).dir().absolutePath(); pOptions->sEngineName = m_ui.EngineNameComboBox->currentText(); pOptions->sAudioDriver = m_ui.AudioDriverComboBox->currentText(); pOptions->sMidiDriver = m_ui.MidiDriverComboBox->currentText(); pOptions->iMidiMap = m_ui.MidiMapComboBox->currentIndex(); pOptions->saveComboBoxHistory(m_ui.InstrumentFileComboBox); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void ChannelForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0 && m_ui.OkPushButton->isEnabled()) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Some channel settings have been changed.\n\n" "Do you want to apply the changes?"), QMessageBox::Apply | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Apply: accept(); return; case QMessageBox::Discard: break; default: // Cancel. bReject = false; break; } } if (bReject) QDialog::reject(); } // Browse and open an instrument file. void ChannelForm::openInstrumentFile (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // FIXME: the instrument file filters should be restricted, // depending on the current engine. QString sInstrumentFile = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. pOptions->sInstrumentDir, // Start here. tr("Instrument files") + " (*.gig *.dls)" // Filter (GIG and DLS files) ); if (sInstrumentFile.isEmpty()) return; m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); updateInstrumentName(); } // Refresh the actual instrument name. void ChannelForm::updateInstrumentName (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Finally this better idea would be to use libgig // to retrieve the REAL instrument names. m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList( m_ui.InstrumentFileComboBox->currentText(), pOptions->bInstrumentNames) ); optionsChanged(); } // Show device options dialog. void ChannelForm::setupDevice ( Device *pDevice, Device::DeviceType deviceTypeMode, const QString& sDriverName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Create the device form if not already... if (m_pDeviceForm == NULL) { m_pDeviceForm = new DeviceForm(this, Qt::Dialog); m_pDeviceForm->setAttribute(Qt::WA_ShowModal); QObject::connect(m_pDeviceForm, SIGNAL(devicesChanged()), this, SLOT(updateDevices())); } // Refresh the device form with selected data. if (m_pDeviceForm) { m_pDeviceForm->setDeviceTypeMode(deviceTypeMode); m_pDeviceForm->refreshDevices(); m_pDeviceForm->setDevice(pDevice); m_pDeviceForm->setDriverName(sDriverName); m_pDeviceForm->show(); } } // Refresh MIDI driver item devices. void ChannelForm::selectMidiDriverItem ( const QString& sMidiDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; const QString sDriverName = sMidiDriver.toUpper(); // Save current device id. // Save current device id. int iDeviceID = 0; Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice) iDeviceID = pDevice->deviceID(); // Clean maplist. m_ui.MidiDeviceComboBox->clear(); qDeleteAll(m_midiDevices); m_midiDevices.clear(); // Populate with the current ones... const QPixmap midiPixmap(":/icons/midi2.png"); int *piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Midi); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { pDevice = new Device(Device::Midi, piDeviceIDs[i]); if (pDevice->driverName().toUpper() == sDriverName) { m_ui.MidiDeviceComboBox->insertItem(0, midiPixmap, pDevice->deviceName()); m_midiDevices.append(pDevice); } else { delete pDevice; } } // Do proper enabling... bool bEnabled = !m_midiDevices.isEmpty(); if (bEnabled) { // Select the previous current device... iMidiItem = 0; QListIterator iter(m_midiDevices); while (iter.hasNext()) { pDevice = iter.next(); if (pDevice->deviceID() == iDeviceID) { m_ui.MidiDeviceComboBox->setCurrentIndex(iMidiItem); selectMidiDeviceItem(iMidiItem); break; } iMidiItem++; } } else { m_ui.MidiDeviceComboBox->insertItem(0, tr("(New MIDI %1 device)").arg(sMidiDriver)); } m_ui.MidiDeviceTextLabel->setEnabled(bEnabled); m_ui.MidiDeviceComboBox->setEnabled(bEnabled); } // Refresh MIDI device options slot. void ChannelForm::selectMidiDriver ( const QString& sMidiDriver ) { if (m_iDirtySetup > 0) return; selectMidiDriverItem(sMidiDriver); optionsChanged(); } // Select MIDI device item. void ChannelForm::selectMidiDeviceItem ( int iMidiItem ) { Device *pDevice = NULL; if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice) { const DeviceParamMap& params = pDevice->params(); int iPorts = params["PORTS"].value.toInt(); m_ui.MidiPortTextLabel->setEnabled(iPorts > 0); m_ui.MidiPortSpinBox->setEnabled(iPorts > 0); if (iPorts > 0) m_ui.MidiPortSpinBox->setMaximum(iPorts - 1); } } // Select MIDI device options slot. void ChannelForm::selectMidiDevice ( int iMidiItem ) { if (m_iDirtySetup > 0) return; selectMidiDeviceItem(iMidiItem); optionsChanged(); } // MIDI device options. void ChannelForm::setupMidiDevice (void) { Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); setupDevice(pDevice, Device::Midi, m_ui.MidiDriverComboBox->currentText()); } // Refresh Audio driver item devices. void ChannelForm::selectAudioDriverItem ( const QString& sAudioDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; const QString sDriverName = sAudioDriver.toUpper(); // Save current device id. int iDeviceID = 0; Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); if (pDevice) iDeviceID = pDevice->deviceID(); // Clean maplist. m_ui.AudioDeviceComboBox->clear(); qDeleteAll(m_audioDevices); m_audioDevices.clear(); // Populate with the current ones... const QPixmap audioPixmap(":/icons/audio2.png"); int *piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Audio); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { pDevice = new Device(Device::Audio, piDeviceIDs[i]); if (pDevice->driverName().toUpper() == sDriverName) { m_ui.AudioDeviceComboBox->insertItem(0, audioPixmap, pDevice->deviceName()); m_audioDevices.append(pDevice); } else { delete pDevice; } } // Do proper enabling... bool bEnabled = !m_audioDevices.isEmpty(); if (bEnabled) { // Select the previous current device... iAudioItem = 0; QListIterator iter(m_audioDevices); while (iter.hasNext()) { pDevice = iter.next(); if (pDevice->deviceID() == iDeviceID) { m_ui.AudioDeviceComboBox->setCurrentIndex(iAudioItem); selectAudioDeviceItem(iAudioItem); break; } iAudioItem++; } } else { m_ui.AudioDeviceComboBox->insertItem(0, tr("(New Audio %1 device)").arg(sAudioDriver)); //m_ui.AudioRoutingTable->setNumRows(0); } m_ui.AudioDeviceTextLabel->setEnabled(bEnabled); m_ui.AudioDeviceComboBox->setEnabled(bEnabled); m_ui.AudioRoutingTable->setEnabled(bEnabled); } // Refresh Audio device options slot. void ChannelForm::selectAudioDriver ( const QString& sAudioDriver ) { if (m_iDirtySetup > 0) return; selectAudioDriverItem(sAudioDriver); optionsChanged(); } // Select Audio device item. void ChannelForm::selectAudioDeviceItem ( int iAudioItem ) { Device *pDevice = NULL; if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); if (pDevice) { // Refresh the audio routing table. m_routingModel.refresh(pDevice, m_pChannel->audioRouting()); // Reset routing change map. m_routingModel.clear(); } } // Select Audio device options slot. void ChannelForm::selectAudioDevice ( int iAudioItem ) { if (m_iDirtySetup > 0) return; selectAudioDeviceItem(iAudioItem); optionsChanged(); } // Audio device options. void ChannelForm::setupAudioDevice (void) { Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); setupDevice(pDevice, Device::Audio, m_ui.AudioDriverComboBox->currentText()); } // UPdate all device lists slot. void ChannelForm::updateDevices (void) { if (m_iDirtySetup > 0) return; selectMidiDriverItem(m_ui.MidiDriverComboBox->currentText()); selectAudioDriverItem(m_ui.AudioDriverComboBox->currentText()); optionsChanged(); } // Dirty up settings. void ChannelForm::optionsChanged (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void ChannelForm::stabilizeForm (void) { const bool bValid = m_ui.EngineNameComboBox->currentIndex() >= 0 && m_ui.EngineNameComboBox->currentText() != Channel::noEngineName(); #if 0 const QString& sPath = InstrumentFileComboBox->currentText(); bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); #endif m_ui.OkPushButton->setEnabled(m_iDirtyCount > 0 && bValid); } void ChannelForm::updateTableCellRenderers (void) { const int rows = m_routingModel.rowCount(); const int cols = m_routingModel.columnCount(); updateTableCellRenderers( m_routingModel.index(0, 0), m_routingModel.index(rows - 1, cols - 1)); } void ChannelForm::updateTableCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_routingModel.index(r, c); m_ui.AudioRoutingTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerChannelForm.cpp qsampler-0.2.2/src/qsamplerOptions.h0000644000175000017500000000654111175543442017373 0ustar alessioalessio// qsamplerOptions.h // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerOptions_h #define __qsamplerOptions_h #include #include class QWidget; class QComboBox; namespace QSampler { //------------------------------------------------------------------------- // QSampler::Options - Prototype settings class. // class Options { public: // Constructor. Options(); // Default destructor. ~Options(); // The settings object accessor. QSettings& settings(); // Command line arguments parser. bool parse_args(const QStringList& args); // Command line usage helper. void print_usage(const QString& arg0); // Startup supplied session file. QString sSessionFile; // Server options... QString sServerHost; int iServerPort; int iServerTimeout; bool bServerStart; QString sServerCmdLine; int iStartDelay; // Logging options... bool bMessagesLog; QString sMessagesLogPath; // Display options... QString sDisplayFont; bool bDisplayEffect; bool bAutoRefresh; int iAutoRefreshTime; int iMaxVolume; QString sMessagesFont; bool bMessagesLimit; int iMessagesLimitLines; bool bConfirmRemove; bool bKeepOnTop; bool bStdoutCapture; bool bCompletePath; bool bInstrumentNames; int iBaseFontSize; // View options... bool bMenubar; bool bToolbar; bool bStatusbar; bool bAutoArrange; // Default options... QString sSessionDir; QString sInstrumentDir; QString sEngineName; QString sAudioDriver; QString sMidiDriver; int iMidiMap; int iMidiBank; int iMidiProg; int iVolume; int iLoadMode; // Recent file list. int iMaxRecentFiles; QStringList recentFiles; // Widget geometry persistence helper prototypes. void saveWidgetGeometry(QWidget *pWidget); void loadWidgetGeometry(QWidget *pWidget); // Combo box history persistence helper prototypes. void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); int getMaxVoices(); int getEffectiveMaxVoices(); void setMaxVoices(int iMaxVoices); int getMaxStreams(); int getEffectiveMaxStreams(); void setMaxStreams(int iMaxStreams); void sendFineTuningSettings(); private: // Settings member variables. QSettings m_settings; // Tuning int iMaxVoices; int iMaxStreams; }; } // namespace QSampler #endif // __qsamplerOptions_h // end of qsamplerOptions.h qsampler-0.2.2/src/qsamplerChannelStrip.ui0000644000175000017500000003034310756410055020512 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerChannelStrip 0 0 815 52 0 0 Qt::StrongFocus Qsampler: Channel :/icons/qsamplerChannel.png 4 4 100 0 120 32 Channel setup &Channel :/icons/qsamplerChannel.png Alt+C 0 0 180 0 320 64 true QFrame::StyledPanel QFrame::Sunken 0 2 -- Instrument name -- false 0 0 20 0 MIDI port / channel -- / -- Qt::AlignHCenter|Qt::AlignTop false 20 0 Instrument load status -- Qt::AlignCenter false 0 0 8 8 8 8 8 8 MIDI Activity QFrame::NoFrame QFrame::Plain Qt::AlignCenter 48 32 Channel mute &Mute Alt+M true 48 32 Channel solo &Solo Alt+S true 100 0 32767 32 Channel volume 100 Qt::Horizontal QSlider::TicksBothSides 10 60 0 120 24 Channel volume % 100 48 32 Edit Channel's Effect Settings &FX Alt+F 48 32 Edit channel's instrument &Edit Alt+E 0 0 64 0 32767 24 Least buffer fill stream usage (%) Qt::Horizontal 48 0 32767 32 Stream / Voice count true QFrame::StyledPanel QFrame::Sunken --/-- Qt::AlignCenter false ChannelSetupPushButton ChannelMutePushButton ChannelSoloPushButton VolumeSlider VolumeSpinBox ChannelEditPushButton qsampler-0.2.2/src/qsamplerInstrumentListForm.cpp0000644000175000017500000002247311147243071022117 0ustar alessioalessio// qsamplerInstrumentListForm.cpp // /**************************************************************************** Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentListForm.h" #include "qsamplerInstrumentForm.h" #include "qsamplerOptions.h" #include "qsamplerInstrument.h" #include "qsamplerMainForm.h" #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentListForm -- Instrument map list form implementation. // InstrumentListForm::InstrumentListForm ( QWidget* pParent, Qt::WindowFlags wflags ) : QMainWindow(pParent, wflags) { m_ui.setupUi(this); // Setup toolbar widgets. m_pMapComboBox = new QComboBox(m_ui.InstrumentToolbar); m_pMapComboBox->setMinimumWidth(120); m_pMapComboBox->setEnabled(false); m_pMapComboBox->setToolTip(tr("Instrument Map")); m_ui.InstrumentToolbar->addWidget(m_pMapComboBox); m_ui.InstrumentToolbar->addSeparator(); m_ui.InstrumentToolbar->addAction(m_ui.newInstrumentAction); m_ui.InstrumentToolbar->addAction(m_ui.editInstrumentAction); m_ui.InstrumentToolbar->addAction(m_ui.deleteInstrumentAction); m_ui.InstrumentToolbar->addSeparator(); m_ui.InstrumentToolbar->addAction(m_ui.refreshInstrumentsAction); int iRowHeight = m_ui.InstrumentTable->fontMetrics().height() + 4; m_ui.InstrumentTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.InstrumentTable->setModel(&m_model); m_ui.InstrumentTable->setItemDelegate(&m_delegate); m_ui.InstrumentTable->verticalHeader()->hide(); QHeaderView *pHeader = m_ui.InstrumentTable->horizontalHeader(); pHeader->setDefaultAlignment(Qt::AlignLeft); pHeader->setMovable(false); pHeader->setStretchLastSection(true); pHeader->resizeSection(0, 120); // Name m_ui.InstrumentTable->resizeColumnToContents(1); // Map m_ui.InstrumentTable->resizeColumnToContents(2); // Bank m_ui.InstrumentTable->resizeColumnToContents(3); // Prog m_ui.InstrumentTable->resizeColumnToContents(4); // Engine pHeader->resizeSection(5, 240); // File m_ui.InstrumentTable->resizeColumnToContents(6); // Nr pHeader->resizeSection(7, 60); // Vol // Enable custom context menu... m_ui.InstrumentTable->setContextMenuPolicy(Qt::CustomContextMenu); QObject::connect(m_pMapComboBox, SIGNAL(activated(int)), SLOT(activateMap(int))); QObject::connect( m_ui.InstrumentTable, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(contextMenu(const QPoint&))); QObject::connect( m_ui.InstrumentTable, SIGNAL(pressed(const QModelIndex&)), SLOT(stabilizeForm())); QObject::connect( m_ui.InstrumentTable, SIGNAL(activated(const QModelIndex&)), SLOT(editInstrument(const QModelIndex&))); QObject::connect( m_ui.newInstrumentAction, SIGNAL(triggered()), SLOT(newInstrument())); QObject::connect( m_ui.deleteInstrumentAction, SIGNAL(triggered()), SLOT(deleteInstrument())); QObject::connect( m_ui.editInstrumentAction, SIGNAL(triggered()), SLOT(editInstrument())); QObject::connect( m_ui.refreshInstrumentsAction, SIGNAL(triggered()), SLOT(refreshInstruments())); MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) { QObject::connect(&m_model, SIGNAL(instrumentsChanged()), pMainForm, SLOT(sessionDirty())); } // Things must be stable from the start. stabilizeForm(); } InstrumentListForm::~InstrumentListForm (void) { delete m_pMapComboBox; } // Notify our parent that we're emerging. void InstrumentListForm::showEvent ( QShowEvent *pShowEvent ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); QWidget::showEvent(pShowEvent); } // Notify our parent that we're closing. void InstrumentListForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); } // Just about to notify main-window that we're closing. void InstrumentListForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) { QWidget::hide(); MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); } // Refresh all instrument list and views. void InstrumentListForm::refreshInstruments (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Get/save current map selection... int iMap = m_pMapComboBox->currentIndex(); if (iMap < 0 || m_pMapComboBox->count() < 2) iMap = pOptions->iMidiMap + 1; // Populate maps list. m_pMapComboBox->clear(); m_pMapComboBox->addItem(tr("(All)")); m_pMapComboBox->insertItems(1, Instrument::getMapNames()); // Adjust to saved selection... if (iMap < 0 || iMap >= m_pMapComboBox->count()) iMap = 0; m_pMapComboBox->setCurrentIndex(iMap); m_pMapComboBox->setEnabled(m_pMapComboBox->count() > 1); activateMap(iMap); } // Refresh instrument maps selector. void InstrumentListForm::activateMap ( int iMap ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; int iMidiMap = iMap - 1; if (iMidiMap >= 0) pOptions->iMidiMap = iMidiMap; m_model.setMidiMap(iMidiMap); m_model.refresh(); stabilizeForm(); } void InstrumentListForm::editInstrument (void) { editInstrument(m_ui.InstrumentTable->currentIndex()); } void InstrumentListForm::editInstrument ( const QModelIndex& index ) { if (!index.isValid() || !index.data(Qt::UserRole).isValid()) return; Instrument* pInstrument = static_cast ( index.data(Qt::UserRole).value ()); if (pInstrument == NULL) return; // Save current key values... Instrument oldInstrument(*pInstrument); // Do the edit dance... InstrumentForm form(this); form.setup(pInstrument); if (form.exec()) { // Commit... pInstrument->mapInstrument(); // Check whether we changed instrument key... if (oldInstrument.map() == pInstrument->map() && oldInstrument.bank() == pInstrument->bank() && oldInstrument.prog() == pInstrument->prog()) { // Just update tree item... //pItem->update(); } else { // Unmap old instance... oldInstrument.unmapInstrument(); // correct the position of the instrument in the model m_model.resort(*pInstrument); } // Notify we've changes... emit m_model.reset(); } } void InstrumentListForm::newInstrument (void) { Instrument instrument; InstrumentForm form(this); form.setup(&instrument); if (!form.exec()) return; // Commit... instrument.mapInstrument(); // add new item to the table model m_model.resort(instrument); // Notify we've changes... //emit model.reset(); //FIXME: call above didnt really refresh, so we use this for now ... refreshInstruments(); } void InstrumentListForm::deleteInstrument (void) { const QModelIndex& index = m_ui.InstrumentTable->currentIndex(); if (!index.isValid() || !index.data(Qt::UserRole).isValid()) return; Instrument *pInstrument = static_cast ( index.data(Qt::UserRole).value ()); if (pInstrument == NULL) return; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; // Prompt user if this is for real... Options *pOptions = pMainForm->options(); if (pOptions && pOptions->bConfirmRemove) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("About to delete instrument map entry:\n\n" "%1\n\n" "Are you sure?") .arg(pInstrument->name()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; } pInstrument->unmapInstrument(); // let the instrument vanish from the table model m_model.removeInstrument(*pInstrument); // Notify we've changes... emit m_model.reset(); } // Update form actions enablement... void InstrumentListForm::stabilizeForm (void) { MainForm *pMainForm = MainForm::getInstance(); bool bEnabled = (pMainForm && pMainForm->client()); m_ui.newInstrumentAction->setEnabled(bEnabled); const QModelIndex& index = m_ui.InstrumentTable->currentIndex(); bEnabled = (bEnabled && index.isValid()); m_ui.editInstrumentAction->setEnabled(bEnabled); m_ui.deleteInstrumentAction->setEnabled(bEnabled); } // Handle custom context menu here... void InstrumentListForm::contextMenu ( const QPoint& pos ) { if (!m_ui.newInstrumentAction->isEnabled()) return; m_ui.contextMenu->exec( (m_ui.InstrumentTable->viewport())->mapToGlobal(pos)); } } // namespace QSampler // end of qsamplerInstrumentListForm.cpp qsampler-0.2.2/src/qsamplerDeviceForm.h0000644000175000017500000000543711147243071017760 0ustar alessioalessio// qsamplerDeviceForm.h // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerDeviceForm_h #define __qsamplerDeviceForm_h #include "ui_qsamplerDeviceForm.h" #include "qsamplerDevice.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceForm -- Device form interface. // class DeviceForm : public QDialog { Q_OBJECT public: DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); ~DeviceForm(); void setDeviceTypeMode(Device::DeviceType deviceType); void setDriverName(const QString& sDriverName); void setDevice(Device *pDevice); public slots: void createDevice(); void deleteDevice(); void refreshDevices(); void selectDriver(const QString& sDriverName); void selectDevice(); void selectDevicePort(int iPort); void changeDeviceParam(int iRow, int iCol); void changeDevicePortParam(int iRow, int iCol); void deviceListViewContextMenu(const QPoint& pos); void stabilizeForm(); void updateCellRenderers(); void updateCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); void updatePortCellRenderers(); void updatePortCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); signals: void devicesChanged(); protected: void showEvent(QShowEvent* pShowEvent); void hideEvent(QHideEvent* pHideEvent); private: Ui::qsamplerDeviceForm m_ui; DeviceParamModel m_deviceParamModel; DeviceParamDelegate m_deviceParamDelegate; PortParamModel m_devicePortParamModel; DeviceParamDelegate m_devicePortParamDelegate; lscp_client_t *m_pClient; int m_iDirtySetup; int m_iDirtyCount; bool m_bNewDevice; Device::DeviceType m_deviceType; Device::DeviceType m_deviceTypeMode; DeviceItem *m_pAudioItems; DeviceItem *m_pMidiItems; }; } // namespace QSampler #endif // __qsamplerDeviceForm_h // end of qsamplerDeviceForm.h qsampler-0.2.2/src/qsamplerInstrumentForm.cpp0000644000175000017500000002603111147243071021255 0ustar alessioalessio// qsamplerInstrumentForm.cpp // /**************************************************************************** Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentForm.h" #include "qsamplerOptions.h" #include "qsamplerChannel.h" #include "qsamplerMainForm.h" #include #include // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentForm -- Instrument map item form implementation. // InstrumentForm::InstrumentForm ( QWidget* pParent ) : QDialog(pParent) { m_ui.setupUi(this); // Initialize locals. m_pInstrument = NULL; m_iDirtySetup = 0; m_iDirtyCount = 0; m_iDirtyName = 0; // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.MapComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.BankSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.ProgSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.NameLineEdit, SIGNAL(textChanged(const QString&)), SLOT(nameChanged(const QString&))); QObject::connect(m_ui.EngineNameComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.InstrumentFileComboBox, SIGNAL(activated(const QString&)), SLOT(updateInstrumentName())); QObject::connect(m_ui.InstrumentFileToolButton, SIGNAL(clicked()), SLOT(openInstrumentFile())); QObject::connect(m_ui.InstrumentNrComboBox, SIGNAL(activated(int)), SLOT(instrumentNrChanged())); QObject::connect(m_ui.VolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.LoadModeComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.OkPushButton, SIGNAL(clicked()), SLOT(accept())); QObject::connect(m_ui.CancelPushButton, SIGNAL(clicked()), SLOT(reject())); } InstrumentForm::~InstrumentForm (void) { } // Channel dialog setup formal initializer. void InstrumentForm::setup ( Instrument *pInstrument ) { m_pInstrument = pInstrument; m_iDirtySetup = 0; m_iDirtyCount = 0; m_iDirtyName = 0; if (m_pInstrument == NULL) return; // Check if we're up and connected. MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // It can be a brand new channel, remember? bool bNew = (m_pInstrument->bank() < 0 || m_pInstrument->prog() < 0); if (!bNew) { m_pInstrument->getInstrument(); m_iDirtyName++; } // Avoid nested changes. m_iDirtySetup++; // Load combo box history... pOptions->loadComboBoxHistory(m_ui.InstrumentFileComboBox); // Populate maps list. m_ui.MapComboBox->clear(); m_ui.MapComboBox->insertItems(0, Instrument::getMapNames()); // Populate Engines list. const char **ppszEngines = ::lscp_list_available_engines(pMainForm->client()); if (ppszEngines) { m_ui.EngineNameComboBox->clear(); for (int iEngine = 0; ppszEngines[iEngine]; iEngine++) m_ui.EngineNameComboBox->addItem(ppszEngines[iEngine]); } else pMainForm->appendMessagesClient("lscp_list_available_engines"); // Read proper instrument information, // and populate the instrument form fields. // Instrument map name... int iMap = (bNew ? pOptions->iMidiMap : m_pInstrument->map()); if (iMap < 0) iMap = 0; const QString& sMapName = Instrument::getMapName(iMap); if (!sMapName.isEmpty()) { m_ui.MapComboBox->setCurrentIndex( m_ui.MapComboBox->findText(sMapName, Qt::MatchExactly | Qt::MatchCaseSensitive)); } // It might be no maps around... bool bMapEnabled = (m_ui.MapComboBox->count() > 0); m_ui.MapTextLabel->setEnabled(bMapEnabled); m_ui.MapComboBox->setEnabled(bMapEnabled); // Instrument bank/program... int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank()); int iProg = (bNew ? pOptions->iMidiProg : m_pInstrument->prog()) + 1; if (bNew && iProg > 128) { iProg = 1; iBank++; } m_ui.BankSpinBox->setValue(iBank); m_ui.ProgSpinBox->setValue(iProg); // Instrument name... m_ui.NameLineEdit->setText(m_pInstrument->name()); // Engine name... QString sEngineName = m_pInstrument->engineName(); if (sEngineName.isEmpty() || bNew) sEngineName = pOptions->sEngineName; if (sEngineName.isEmpty()) sEngineName = Channel::noEngineName(); if (m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.EngineNameComboBox->addItem(sEngineName); } m_ui.EngineNameComboBox->setCurrentIndex( m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive)); // Instrument filename and index... QString sInstrumentFile = m_pInstrument->instrumentFile(); if (sInstrumentFile.isEmpty()) sInstrumentFile = Channel::noInstrumentName(); m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList(sInstrumentFile, pOptions->bInstrumentNames)); m_ui.InstrumentNrComboBox->setCurrentIndex(m_pInstrument->instrumentNr()); // Instrument volume.... int iVolume = (bNew ? pOptions->iVolume : ::lroundf(100.0f * m_pInstrument->volume())); m_ui.VolumeSpinBox->setValue(iVolume); // Instrument load mode... int iLoadMode = (bNew ? pOptions->iLoadMode : m_pInstrument->loadMode()); m_ui.LoadModeComboBox->setCurrentIndex(iLoadMode); // Done. m_iDirtySetup--; stabilizeForm(); // Done. m_iDirtySetup--; stabilizeForm(); } // Special case for name change, void InstrumentForm::nameChanged ( const QString& /* sName */ ) { if (m_iDirtySetup > 0) return; m_iDirtyName++; changed(); } // Browse and open an instrument file. void InstrumentForm::openInstrumentFile (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // FIXME: the instrument file filters should be restricted, // depending on the current engine. QString sInstrumentFile = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. pOptions->sInstrumentDir, // Start here. tr("Instrument files") + " (*.gig *.dls)" // Filter (GIG and DLS files) ); if (sInstrumentFile.isEmpty()) return; m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); updateInstrumentName(); } // Refresh the actual instrument name. void InstrumentForm::updateInstrumentName (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // TODO: this better idea would be to use libgig // to retrieve the REAL instrument names. m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList( m_ui.InstrumentFileComboBox->currentText(), pOptions->bInstrumentNames) ); instrumentNrChanged(); } // Special case for instrumnet index change, void InstrumentForm::instrumentNrChanged (void) { if (m_iDirtySetup > 0) return; if (m_ui.NameLineEdit->text().isEmpty() || m_iDirtyName == 0) { m_ui.NameLineEdit->setText(m_ui.InstrumentNrComboBox->currentText()); m_iDirtyName = 0; } changed(); } // Accept settings (OK button slot). void InstrumentForm::accept (void) { if (m_pInstrument == NULL) return; MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; if (m_iDirtyCount > 0) { m_pInstrument->setMap(m_ui.MapComboBox->currentIndex()); m_pInstrument->setBank(m_ui.BankSpinBox->value()); m_pInstrument->setProg(m_ui.ProgSpinBox->value() - 1); m_pInstrument->setName(m_ui.NameLineEdit->text()); m_pInstrument->setEngineName(m_ui.EngineNameComboBox->currentText()); m_pInstrument->setInstrumentFile(m_ui.InstrumentFileComboBox->currentText()); m_pInstrument->setInstrumentNr(m_ui.InstrumentNrComboBox->currentIndex()); m_pInstrument->setVolume(0.01f * float(m_ui.VolumeSpinBox->value())); m_pInstrument->setLoadMode(m_ui.LoadModeComboBox->currentIndex()); } // Save default engine name, instrument directory and history... pOptions->sInstrumentDir = QFileInfo( m_ui.InstrumentFileComboBox->currentText()).dir().absolutePath(); pOptions->sEngineName = m_ui.EngineNameComboBox->currentText(); pOptions->iMidiMap = m_ui.MapComboBox->currentIndex(); pOptions->iMidiBank = m_ui.BankSpinBox->value(); pOptions->iMidiProg = m_ui.ProgSpinBox->value(); pOptions->iVolume = m_ui.VolumeSpinBox->value(); pOptions->iLoadMode = m_ui.LoadModeComboBox->currentIndex(); pOptions->saveComboBoxHistory(m_ui.InstrumentFileComboBox); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void InstrumentForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0 && m_ui.OkPushButton->isEnabled()) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Some channel settings have been changed.\n\n" "Do you want to apply the changes?"), QMessageBox::Apply | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Apply: accept(); return; case QMessageBox::Discard: break; default: // Cancel. bReject = false; break; } } if (bReject) QDialog::reject(); } // Dirty up settings. void InstrumentForm::changed (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void InstrumentForm::stabilizeForm (void) { bool bValid = !m_ui.NameLineEdit->text().isEmpty() && m_ui.EngineNameComboBox->currentIndex() >= 0 && m_ui.EngineNameComboBox->currentText() != Channel::noEngineName(); const QString& sPath = m_ui.InstrumentFileComboBox->currentText(); bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); m_ui.OkPushButton->setEnabled(m_iDirtyCount > 0 && bValid); } } // namespace QSampler // end of qsamplerInstrumentForm.cpp qsampler-0.2.2/src/qsamplerInstrument.h0000644000175000017500000000506610725741145020111 0ustar alessioalessio// qsamplerInstrument.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerInstrument_h #define __qsamplerInstrument_h #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::Instrument - MIDI instrument map structure. // class Instrument { public: // Constructor. Instrument(int iMap = 0, int iBank = -1, int iProg = -1); // Default destructor. ~Instrument(); // Instrument accessors. void setMap(int iMap); int map() const; void setBank(int iBank); int bank() const; void setProg(int iProg); int prog() const; void setName(const QString& sName); const QString& name() const; void setEngineName(const QString& sEngineName); const QString& engineName() const; void setInstrumentFile(const QString& sInstrumentFile); const QString& instrumentFile() const; const QString& instrumentName() const; void setInstrumentNr(int InstrumentNr); int instrumentNr() const; void setVolume(float fVolume); float volume() const; void setLoadMode(int iLoadMode); int loadMode() const; // Sync methods. bool getInstrument(); bool mapInstrument(); bool unmapInstrument(); // Instrument map names initialization... static QStringList getMapNames(); static QString getMapName(int iMidiMap); private: // Instance variables. int m_iMap; int m_iBank; int m_iProg; QString m_sName; QString m_sEngineName; QString m_sInstrumentFile; QString m_sInstrumentName; int m_iInstrumentNr; float m_fVolume; int m_iLoadMode; }; } // namespace QSampler #endif // __qsamplerInstrument_h // end of qsamplerInstrument.h qsampler-0.2.2/src/qsamplerInstrumentList.cpp0000644000175000017500000002114310725741145021272 0ustar alessioalessio// qsamplerInstrumentList.cpp // /**************************************************************************** Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentList.h" #include "qsamplerInstrument.h" #include "qsamplerInstrumentForm.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include #include #include #include // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif using namespace QSampler; //------------------------------------------------------------------------- // QSampler::MidiInstrumentsModel - data model for MIDI prog mappings // (used for QTableView) MidiInstrumentsModel::MidiInstrumentsModel ( QObject* pParent) : QAbstractTableModel(pParent) { m_iMidiMap = LSCP_MIDI_MAP_ALL; } int MidiInstrumentsModel::rowCount ( const QModelIndex& /*parent*/) const { if (m_iMidiMap == LSCP_MIDI_MAP_ALL) { int n = 0; for (InstrumentsMap::const_iterator itMap = m_instruments.begin(); itMap != m_instruments.end(); ++itMap) n += (*itMap).size(); return n; } InstrumentsMap::const_iterator itMap = m_instruments.find(m_iMidiMap); if (itMap == m_instruments.end()) return 0; return (*itMap).size(); } int MidiInstrumentsModel::columnCount ( const QModelIndex& /*parent*/) const { return 9; } QVariant MidiInstrumentsModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); const Instrument* pInstr = NULL; if (m_iMidiMap == LSCP_MIDI_MAP_ALL) { int n = 0; for (InstrumentsMap::const_iterator itMap = m_instruments.begin(); itMap != m_instruments.end(); ++itMap) { n += (*itMap).size(); if (index.row() < n) { pInstr = &(*itMap)[index.row() + (*itMap).size() - n]; break; } } } else { // resolve MIDI instrument map InstrumentsMap::const_iterator itMap = m_instruments.find(m_iMidiMap); if (itMap == m_instruments.end()) return QVariant(); // resolve instrument in that map if (index.row() >= (*itMap).size()) return QVariant(); pInstr = &(*itMap)[index.row()]; } if (!pInstr) return QVariant(); if (role == Qt::UserRole) return QVariant::fromValue((void *) pInstr); if (role == Qt::DisplayRole) { switch (index.column()) { case 0: return pInstr->name(); case 1: return QVariant::fromValue(pInstr->map()); case 2: return QVariant::fromValue(pInstr->bank()); case 3: return QVariant::fromValue(pInstr->prog() + 1); case 4: return pInstr->engineName(); case 5: return pInstr->instrumentFile(); case 6: return QVariant::fromValue(pInstr->instrumentNr()); case 7: return QString::number(pInstr->volume() * 100.0) + " %"; case 8: { switch (pInstr->loadMode()) { case 3: return QObject::tr("Persistent"); case 2: return QObject::tr("On Demand Hold"); case 1: return QObject::tr("On Demand"); } } default: return QVariant(); } } return QVariant(); } QVariant MidiInstrumentsModel::headerData ( int section, Qt::Orientation orientation, int role ) const { if (orientation != Qt::Horizontal || role != Qt::DisplayRole) return QVariant(); switch (section) { case 0: return tr("Name"); case 1: return tr("Map"); case 2: return tr("Bank"); case 3: return tr("Prog"); case 4: return tr("Engine"); case 5: return tr("File"); case 6: return tr("Nr"); case 7: return tr("Vol"); case 8: return tr("Mode"); default: return QVariant(); } } Instrument* MidiInstrumentsModel::addInstrument ( int iMap, int iBank, int iProg ) { // Check it there's already one instrument item // with the very same key (bank, program); // if yes, just remove it without prejudice... for (int i = 0; i < m_instruments[iMap].size(); i++) { if (m_instruments[iMap][i].bank() == iBank && m_instruments[iMap][i].prog() == iProg) { m_instruments[iMap].removeAt(i); break; } } // Resolve the appropriate place, we keep the list sorted that way ... int i = 0; for (; i < m_instruments[iMap].size(); ++i) { if (iBank < m_instruments[iMap][i].bank() || (iBank == m_instruments[iMap][i].bank() && iProg < m_instruments[iMap][i].prog())) { break; } } m_instruments[iMap].insert(i, Instrument(iMap, iBank, iProg)); Instrument& instr = m_instruments[iMap][i]; if (!instr.getInstrument()) m_instruments[iMap].removeAt(i); return &instr; } void MidiInstrumentsModel::removeInstrument ( const Instrument& instrument ) { const int iMap = instrument.map(); const int iBank = instrument.bank(); const int iProg = instrument.prog(); for (int i = 0; i < m_instruments[iMap].size(); i++) { if (m_instruments[iMap][i].bank() == iBank && m_instruments[iMap][i].prog() == iProg) { m_instruments[iMap].removeAt(i); break; } } } // Reposition the instrument in the model (called when map/bank/prg changed) void MidiInstrumentsModel::resort ( const Instrument& instrument ) { const int iMap = instrument.map(); const int iBank = instrument.bank(); const int iProg = instrument.prog(); // Remove given instrument from its current list removeInstrument(instrument); // Re-add the instrument addInstrument(iMap, iBank, iProg); } void MidiInstrumentsModel::setMidiMap ( int iMidiMap ) { if (iMidiMap < 0) iMidiMap = LSCP_MIDI_MAP_ALL; m_iMidiMap = iMidiMap; } int MidiInstrumentsModel::midiMap (void) const { return m_iMidiMap; } void MidiInstrumentsModel::refresh (void) { m_instruments.clear(); MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // Load the whole bunch of instrument items... lscp_midi_instrument_t* pInstrs = ::lscp_list_midi_instruments(pMainForm->client(), m_iMidiMap); for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; ++iInstr) { const int iMap = pInstrs[iInstr].map; const int iBank = pInstrs[iInstr].bank; const int iProg = pInstrs[iInstr].prog; addInstrument(iMap, iBank, iProg); // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } QApplication::restoreOverrideCursor(); if (pInstrs == NULL && ::lscp_client_get_errno(pMainForm->client())) { pMainForm->appendMessagesClient("lscp_list_midi_instruments"); pMainForm->appendMessagesError( tr("Could not get current list of MIDI instrument mappings.\n\nSorry.")); } // inform the outer world (QTableView) that our data changed QAbstractTableModel::reset(); } //------------------------------------------------------------------------- // QSampler::MidiInstrumentsDelegate - table cell renderer for MIDI prog // mappings (doesn't actually do anything ATM, but is already there for a // future cell editor widget implementation) MidiInstrumentsDelegate::MidiInstrumentsDelegate ( QObject* pParent ) : QItemDelegate(pParent) { } QWidget* MidiInstrumentsDelegate::createEditor ( QWidget* pParent, const QStyleOptionViewItem& option, const QModelIndex& index ) const { return QItemDelegate::createEditor(pParent, option, index); // return new QLabel(index.model()->data(index, Qt::DisplayRole).toString(), parent); } void MidiInstrumentsDelegate::setEditorData ( QWidget */*pEditor*/, const QModelIndex& /*index*/) const { } void MidiInstrumentsDelegate::setModelData ( QWidget */*pEditor*/, QAbstractItemModel* /*model*/, const QModelIndex& /*index*/) const { } void MidiInstrumentsDelegate::updateEditorGeometry ( QWidget *pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const { QItemDelegate::updateEditorGeometry(pEditor, option, index); // if (pEditor) pEditor->setGeometry(option.rect); } // end of qsamplerInstrumentList.cpp qsampler-0.2.2/src/qsamplerInstrumentForm.h0000644000175000017500000000363511147243071020727 0ustar alessioalessio// qsamplerInstrumentForm.h // /**************************************************************************** Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentForm_h #define __qsamplerInstrumentForm_h #include "ui_qsamplerInstrumentForm.h" #include "qsamplerInstrument.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentForm -- Instrument map item form interface. // class InstrumentForm : public QDialog { Q_OBJECT public: InstrumentForm(QWidget* pParent = NULL); ~InstrumentForm(); void setup(Instrument* pInstrument); public slots: void nameChanged(const QString& sName); void openInstrumentFile(); void updateInstrumentName(); void instrumentNrChanged(); void accept(); void reject(); void changed(); void stabilizeForm(); private: Ui::qsamplerInstrumentForm m_ui; Instrument* m_pInstrument; int m_iDirtySetup; int m_iDirtyCount; int m_iDirtyName; }; } // namespace QSampler #endif // __qsamplerInstrumentForm_h // end of qsamplerInstrumentForm.h qsampler-0.2.2/src/qsamplerChannelStrip.cpp0000644000175000017500000003507010756517365020675 0ustar alessioalessio// qsamplerChannelStrip.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerChannelStrip.h" #include "qsamplerMainForm.h" #include "qsamplerChannelFxForm.h" #include #include #include #define MIDI_OFF_COLOR Qt::darkGreen #define MIDI_ON_COLOR Qt::green // Channel status/usage usage limit control. #define QSAMPLER_ERROR_LIMIT 3 // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::ChannelStrip -- Channel strip form implementation. // // Channel strip activation/selection. ChannelStrip *ChannelStrip::g_pSelectedStrip = NULL; ChannelStrip::ChannelStrip ( QWidget* pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { m_ui.setupUi(this); // Initialize locals. m_pChannel = NULL; m_iDirtyChange = 0; m_iErrorCount = 0; // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.ChannelSetupPushButton, SIGNAL(clicked()), SLOT(channelSetup())); QObject::connect(m_ui.ChannelMutePushButton, SIGNAL(toggled(bool)), SLOT(channelMute(bool))); QObject::connect(m_ui.ChannelSoloPushButton, SIGNAL(toggled(bool)), SLOT(channelSolo(bool))); QObject::connect(m_ui.VolumeSlider, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); QObject::connect(m_ui.VolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); QObject::connect(m_ui.ChannelEditPushButton, SIGNAL(clicked()), SLOT(channelEdit())); QObject::connect(m_ui.FxPushButton, SIGNAL(clicked()), SLOT(channelFxEdit())); pMidiActivityTimer = new QTimer(this); pMidiActivityTimer->setSingleShot(true); QObject::connect( pMidiActivityTimer, SIGNAL(timeout()), this, SLOT(midiDataCeased()) ); #if CONFIG_EVENT_CHANNEL_MIDI m_ui.MidiActivityLabel->setPalette(MIDI_OFF_COLOR); m_ui.MidiActivityLabel->setAutoFillBackground(true); #else m_ui.MidiActivityLabel->setText("X"); m_ui.MidiActivityLabel->setToolTip("MIDI Activity Disabled"); #endif setSelected(false); } ChannelStrip::~ChannelStrip (void) { setSelected(false); // Destroy existing channel descriptor. if (m_pChannel) delete m_pChannel; m_pChannel = NULL; } // Window drag-n-drop event handlers. void ChannelStrip::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) { if (m_pChannel == NULL) return; bool bAccept = false; if (pDragEnterEvent->source() == NULL) { const QMimeData *pMimeData = pDragEnterEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { bAccept = Channel::isInstrumentFile(sFilename); break; } } } } if (bAccept) pDragEnterEvent->accept(); else pDragEnterEvent->ignore(); } void ChannelStrip::dropEvent ( QDropEvent* pDropEvent ) { if (m_pChannel == NULL) return; if (pDropEvent->source()) return; const QMimeData *pMimeData = pDropEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QStringList files; QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { // Go and set the dropped instrument filename... m_pChannel->setInstrument(sFilename, 0); // Open up the channel dialog. channelSetup(); break; } } } } // Channel strip setup formal initializer. void ChannelStrip::setup ( Channel *pChannel ) { // Destroy any previous channel descriptor; // (remember that once setup we own it!) if (m_pChannel) delete m_pChannel; // Set the new one... m_pChannel = pChannel; // Stabilize this around. updateChannelInfo(); // We'll accept drops from now on... if (m_pChannel) setAcceptDrops(true); } // Channel secriptor accessor. Channel *ChannelStrip::channel (void) const { return m_pChannel; } // Messages view font accessors. QFont ChannelStrip::displayFont (void) const { return m_ui.EngineNameTextLabel->font(); } void ChannelStrip::setDisplayFont ( const QFont & font ) { m_ui.EngineNameTextLabel->setFont(font); m_ui.MidiPortChannelTextLabel->setFont(font); m_ui.InstrumentNameTextLabel->setFont(font); m_ui.InstrumentStatusTextLabel->setFont(font); } // Channel display background effect. void ChannelStrip::setDisplayEffect ( bool bDisplayEffect ) { QPalette pal; pal.setColor(QPalette::Foreground, Qt::yellow); m_ui.EngineNameTextLabel->setPalette(pal); m_ui.MidiPortChannelTextLabel->setPalette(pal); pal.setColor(QPalette::Foreground, Qt::green); if (bDisplayEffect) { QPixmap pm(":/icons/displaybg1.png"); pal.setBrush(QPalette::Background, QBrush(pm)); } else { pal.setColor(QPalette::Background, Qt::black); } m_ui.ChannelInfoFrame->setPalette(pal); m_ui.InstrumentNameTextLabel->setPalette(pal); m_ui.StreamVoiceCountTextLabel->setPalette(pal); } // Maximum volume slider accessors. void ChannelStrip::setMaxVolume ( int iMaxVolume ) { m_iDirtyChange++; m_ui.VolumeSlider->setRange(0, iMaxVolume); m_ui.VolumeSpinBox->setRange(0, iMaxVolume); m_iDirtyChange--; } // Channel setup dialog slot. bool ChannelStrip::channelSetup (void) { if (m_pChannel == NULL) return false; // Invoke the channel setup dialog. bool bResult = m_pChannel->channelSetup(this); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel mute slot. bool ChannelStrip::channelMute ( bool bMute ) { if (m_pChannel == NULL) return false; // Invoke the channel mute method. bool bResult = m_pChannel->setChannelMute(bMute); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel solo slot. bool ChannelStrip::channelSolo ( bool bSolo ) { if (m_pChannel == NULL) return false; // Invoke the channel solo method. bool bResult = m_pChannel->setChannelSolo(bSolo); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel edit slot. void ChannelStrip::channelEdit (void) { if (m_pChannel == NULL) return; m_pChannel->editChannel(); } bool ChannelStrip::channelFxEdit (void) { MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !channel()) return false; pMainForm->appendMessages(QObject::tr("channel fx sends...")); bool bResult = false; #if CONFIG_FXSEND ChannelFxForm *pChannelFxForm = new ChannelFxForm(channel(), parentWidget()); if (pChannelFxForm) { //pChannelForm->setup(this); bResult = pChannelFxForm->exec(); delete pChannelFxForm; } #else // CONFIG_FXSEND QMessageBox::critical(this, QSAMPLER_TITLE ": " + tr("Unavailable"), tr("Sorry, QSampler was built without FX send support!\n\n" "(Make sure you have a recent liblscp when recompiling QSampler)")); #endif // CONFIG_FXSEND return bResult; } // Channel reset slot. bool ChannelStrip::channelReset (void) { if (m_pChannel == NULL) return false; // Invoke the channel reset method. bool bResult = m_pChannel->channelReset(); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Update the channel instrument name. bool ChannelStrip::updateInstrumentName ( bool bForce ) { if (m_pChannel == NULL) return false; // Do we refresh the actual name? if (bForce) m_pChannel->updateInstrumentName(); // Instrument name... if (m_pChannel->instrumentName().isEmpty()) { if (m_pChannel->instrumentStatus() >= 0) { m_ui.InstrumentNameTextLabel->setText( ' ' + Channel::loadingInstrument()); } else { m_ui.InstrumentNameTextLabel->setText( ' ' + Channel::noInstrumentName()); } } else { m_ui.InstrumentNameTextLabel->setText( ' ' + m_pChannel->instrumentName()); } return true; } // Do the dirty volume change. bool ChannelStrip::updateChannelVolume (void) { if (m_pChannel == NULL) return false; // Convert... int iVolume = ::lroundf(100.0f * m_pChannel->volume()); // And clip... if (iVolume < 0) iVolume = 0; // Flag it here, to avoid infinite recursion. m_iDirtyChange++; m_ui.VolumeSlider->setValue(iVolume); m_ui.VolumeSpinBox->setValue(iVolume); m_iDirtyChange--; return true; } // Update whole channel info state. bool ChannelStrip::updateChannelInfo (void) { if (m_pChannel == NULL) return false; // Check for error limit/recycle... if (m_iErrorCount > QSAMPLER_ERROR_LIMIT) return true; // Update strip caption. QString sText = m_pChannel->channelName(); setWindowTitle(sText); m_ui.ChannelSetupPushButton->setText('&' + sText); // Check if we're up and connected. MainForm* pMainForm = MainForm::getInstance(); if (pMainForm->client() == NULL) return false; // Read actual channel information. m_pChannel->updateChannelInfo(); // Engine name... if (m_pChannel->engineName().isEmpty()) { m_ui.EngineNameTextLabel->setText( ' ' + Channel::noEngineName()); } else { m_ui.EngineNameTextLabel->setText( ' ' + m_pChannel->engineName()); } // Instrument name... updateInstrumentName(false); // MIDI Port/Channel... QString sMidiPortChannel = QString::number(m_pChannel->midiPort()) + " / "; if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) sMidiPortChannel += tr("All"); else sMidiPortChannel += QString::number(m_pChannel->midiChannel() + 1); m_ui.MidiPortChannelTextLabel->setText(sMidiPortChannel); // Common palette... QPalette pal; const QColor& rgbFore = pal.color(QPalette::Foreground); // Instrument status... int iInstrumentStatus = m_pChannel->instrumentStatus(); if (iInstrumentStatus < 0) { pal.setColor(QPalette::Foreground, Qt::red); m_ui.InstrumentStatusTextLabel->setPalette(pal); m_ui.InstrumentStatusTextLabel->setText( tr("ERR%1").arg(iInstrumentStatus)); m_iErrorCount++; return false; } // All seems normal... pal.setColor(QPalette::Foreground, iInstrumentStatus < 100 ? Qt::yellow : Qt::green); m_ui.InstrumentStatusTextLabel->setPalette(pal); m_ui.InstrumentStatusTextLabel->setText( QString::number(iInstrumentStatus) + '%'); m_iErrorCount = 0; #ifdef CONFIG_MUTE_SOLO // Mute/Solo button state coloring... bool bMute = m_pChannel->channelMute(); const QColor& rgbButton = pal.color(QPalette::Button); pal.setColor(QPalette::Foreground, rgbFore); pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); m_ui.ChannelMutePushButton->setPalette(pal); m_ui.ChannelMutePushButton->setDown(bMute); bool bSolo = m_pChannel->channelSolo(); pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton); m_ui.ChannelSoloPushButton->setPalette(pal); m_ui.ChannelSoloPushButton->setDown(bSolo); #else m_ui.ChannelMutePushButton->setEnabled(false); m_ui.ChannelSoloPushButton->setEnabled(false); #endif // And update the both GUI volume elements; // return success if, and only if, intrument is fully loaded... return updateChannelVolume() && (iInstrumentStatus == 100); } // Update whole channel usage state. bool ChannelStrip::updateChannelUsage (void) { if (m_pChannel == NULL) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm->client() == NULL) return false; // This only makes sense on fully loaded channels... if (m_pChannel->instrumentStatus() < 100) return false; // Get current channel voice count. int iVoiceCount = ::lscp_get_channel_voice_count( pMainForm->client(), m_pChannel->channelID()); // Get current stream count. int iStreamCount = ::lscp_get_channel_stream_count( pMainForm->client(), m_pChannel->channelID()); // Get current channel buffer fill usage. // As benno has suggested this is the percentage usage // of the least filled buffer stream... int iStreamUsage = ::lscp_get_channel_stream_usage( pMainForm->client(), m_pChannel->channelID());; // Update the GUI elements... m_ui.StreamUsageProgressBar->setValue(iStreamUsage); m_ui.StreamVoiceCountTextLabel->setText( QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount)); // We're clean. return true; } // Volume change slot. void ChannelStrip::volumeChanged ( int iVolume ) { if (m_pChannel == NULL) return; // Avoid recursion. if (m_iDirtyChange > 0) return; // Convert and clip. float fVolume = (float) iVolume / 100.0f; if (fVolume < 0.001f) fVolume = 0.0f; // Update the GUI elements. if (m_pChannel->setVolume(fVolume)) { updateChannelVolume(); emit channelChanged(this); } } void ChannelStrip::midiArrived() { m_ui.MidiActivityLabel->setPalette(MIDI_ON_COLOR); pMidiActivityTimer->start(50); } // Context menu event handler. void ChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent ) { if (m_pChannel == NULL) return; // We'll just show up the main form's edit menu (thru qsamplerChannel). m_pChannel->contextMenuEvent(pEvent); } void ChannelStrip::midiDataCeased() { m_ui.MidiActivityLabel->setPalette(MIDI_OFF_COLOR); } // Error count hackish accessors. void ChannelStrip::resetErrorCount (void) { m_iErrorCount = 0; } // Channel strip activation/selection. void ChannelStrip::setSelected ( bool bSelected ) { if (bSelected) { if (g_pSelectedStrip == this) return; if (g_pSelectedStrip) g_pSelectedStrip->setSelected(false); g_pSelectedStrip = this; } else { if (g_pSelectedStrip == this) g_pSelectedStrip = NULL; } QPalette pal; if (bSelected) { const QColor& color = pal.midlight().color(); pal.setColor(QPalette::Background, color.dark(150)); pal.setColor(QPalette::Foreground, color.light(150)); } QWidget::setPalette(pal); } bool ChannelStrip::isSelected (void) const { return (this == g_pSelectedStrip); } } // namespace QSampler // end of qsamplerChannelStrip.cpp qsampler-0.2.2/src/qsamplerDeviceStatusForm.h0000644000175000017500000000425610756010171021160 0ustar alessioalessio// qsamplerDeviceStatusForm.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerDeviceStatusForm_h #define __qsamplerDeviceStatusForm_h #include "qsamplerDevice.h" #include #include #include #include #include #include namespace QSampler { class MidiActivityLED : public QLabel { Q_OBJECT public: MidiActivityLED(QString text = "", QWidget* parent = 0); void midiDataArrived(); protected slots: void midiDataCeased(); private: QTimer timer; }; class DeviceStatusForm : public QMainWindow { Q_OBJECT public: DeviceStatusForm(int DeviceID, QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~DeviceStatusForm(); QAction* visibleAction(); void midiArrived(int iPort); static DeviceStatusForm* getInstance(int iDeviceID); static const std::map& getInstances(); static void onDevicesChanged(); static void onDeviceChanged(int iDeviceID); static void deleteAllInstances(); protected: void closeEvent(QCloseEvent* event); void updateGUIPorts(); std::vector midiActivityLEDs; private: int m_DeviceID; Device* m_pDevice; QAction* m_pVisibleAction; static std::map instances; }; } // namespace QSampler #endif // __qsamplerDeviceStatusForm_h // end of qsamplerDeviceStatusForm.h qsampler-0.2.2/src/qsamplerFxSendsModel.cpp0000644000175000017500000001134110752101751020611 0ustar alessioalessio// qsamplerFxSendList.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerFxSendsModel.h" #include "qsamplerFxSend.h" #include #include #include namespace QSampler { FxSendsModel::FxSendsModel(int SamplerChannelID, QObject* pParent) : QAbstractListModel(pParent) { m_SamplerChannelID = SamplerChannelID; cleanRefresh(); } int FxSendsModel::rowCount(const QModelIndex& /*parent*/) const { return m_FxSends.size(); } QVariant FxSendsModel::data(const QModelIndex& index, int role) const { if (!index.isValid()) return QVariant(); switch (role) { case Qt::DisplayRole: return m_FxSends[index.row()].name(); break; case Qt::ToolTipRole: if (m_FxSends[index.row()].deletion()) return QString( "Scheduled for deletion. Click on 'Apply' to actually " "destroy FX Send." ); return (m_FxSends[index.row()].isNew()) ? QString( "New FX send. Click on 'Apply' to actually " "perform creation." ) : QString("FX Send ID ") + QString::number(m_FxSends[index.row()].id()); break; case Qt::ForegroundRole: if (m_FxSends[index.row()].deletion()) return QBrush(Qt::red); if (m_FxSends[index.row()].isNew()) return QBrush(Qt::green); break; case Qt::DecorationRole: if (m_FxSends[index.row()].deletion()) return QIcon(":/icons/formRemove.png"); if (m_FxSends[index.row()].isNew()) return QIcon(":/icons/itemNew.png"); if (m_FxSends[index.row()].isModified()) return QIcon(":/icons/formEdit.png"); return QIcon(":/icons/itemFile.png"); case Qt::FontRole: { if (m_FxSends[index.row()].isModified()) { QFont font; font.setBold(true); return font; } break; } default: return QVariant(); } return QVariant(); } bool FxSendsModel::setData( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; m_FxSends[index.row()].setName(value.toString()); emit dataChanged(index, index); emit fxSendsDirtyChanged(true); return true; } QVariant FxSendsModel::headerData(int section, Qt::Orientation /*orientation*/, int role) const { if (role == Qt::DisplayRole && section == 0) return QString("FX Send Name"); else return QVariant(); } Qt::ItemFlags FxSendsModel::flags(const QModelIndex& /*index*/) const { return Qt::ItemIsEditable | Qt::ItemIsEnabled; } FxSend* FxSendsModel::addFxSend() { #if CONFIG_FXSEND FxSend fxSend(m_SamplerChannelID); fxSend.setName("New FX Send"); m_FxSends.push_back(fxSend); QModelIndex index = createIndex(m_FxSends.size() - 1, 0); QAbstractListModel::reset(); emit fxSendsDirtyChanged(true); return &m_FxSends.last(); #else // CONFIG_FXSEND return NULL; #endif // CONFIG_FXSEND } FxSend* FxSendsModel::fxSend(const QModelIndex& index) { if (!index.isValid()) return NULL; return &m_FxSends[index.row()]; } void FxSendsModel::removeFxSend(const QModelIndex& index) { FxSend* pFxSend = fxSend(index); if (!pFxSend) return; pFxSend->setDeletion(true); QAbstractListModel::reset(); emit fxSendsDirtyChanged(true); } void FxSendsModel::cleanRefresh() { m_FxSends.clear(); QList sends = FxSend::allFxSendsOfSamplerChannel(m_SamplerChannelID); for (int i = 0; i < sends.size(); ++i) { const int iFxSendId = sends[i]; FxSend fxSend(m_SamplerChannelID, iFxSendId); fxSend.getFromSampler(); m_FxSends.push_back(fxSend); } QAbstractListModel::reset(); emit fxSendsDirtyChanged(false); } void FxSendsModel::onExternalModifiication(const QModelIndex& index) { if (!index.isValid()) return; emit dataChanged(index, index); emit fxSendsDirtyChanged(true); } void FxSendsModel::applyToSampler() { for (int i = 0; i < m_FxSends.size(); ++i) m_FxSends[i].applyToSampler(); // make a clean refresh // (throws out all FxSend objects marked for deletion) cleanRefresh(); } } // namespace QSampler // end of qsamplerFxSendList.cpp qsampler-0.2.2/src/qsamplerMessages.h0000644000175000017500000000563011012621551017471 0ustar alessioalessio// qsamplerMessages.h // /**************************************************************************** Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerMessages_h #define __qsamplerMessages_h #include class QSocketNotifier; class QTextEdit; class QFile; namespace QSampler { //------------------------------------------------------------------------- // QSampler::Messages - Messages log dockable window. // class Messages : public QDockWidget { Q_OBJECT public: // Constructor. Messages(QWidget *pParent); // Destructor. ~Messages(); // Stdout/stderr capture accessors. bool isCaptureEnabled(); void setCaptureEnabled(bool bCapture); // Message font accessors. QFont messagesFont(); void setMessagesFont(const QFont & font); // Maximum number of message lines accessors. int messagesLimit(); void setMessagesLimit(int iMessagesLimit); // Logging settings. bool isLogging() const; void setLogging(bool bEnabled, const QString& sFilename = QString()); // The main utility methods. void appendMessages(const QString& s); void appendMessagesColor(const QString& s, const QString &c); void appendMessagesText(const QString& s); // Stdout capture functions. void appendStdoutBuffer(const QString& s); void flushStdoutBuffer(); // History reset. void clear(); signals: void visibilityChanged(bool bVisible); protected: // Message executives. void appendMessagesLine(const QString& s); void appendMessagesLog(const QString& s); // overridden method of QWidget void showEvent(QShowEvent *pEvent); protected slots: // Stdout capture slot. void stdoutNotify(int fd); private: // The maximum number of message lines. int m_iMessagesLines; int m_iMessagesLimit; int m_iMessagesHigh; // The textview main widget. QTextEdit *m_pMessagesTextView; // Stdout capture variables. QSocketNotifier *m_pStdoutNotifier; QString m_sStdoutBuffer; int m_fdStdout[2]; // Logging stuff. QFile *m_pMessagesLog; }; } // namespace QSampler #endif // __qsamplerMessages_h // end of qsamplerMessages.h qsampler-0.2.2/src/qsamplerOptionsForm.cpp0000644000175000017500000003614211147243071020544 0ustar alessioalessio// qsamplerOptionsForm.cpp // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsamplerOptionsForm.h" #include "qsamplerAbout.h" #include "qsamplerOptions.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::OptionsForm -- Options form implementation. // OptionsForm::OptionsForm ( QWidget* pParent ) : QDialog(pParent) { m_ui.setupUi(this); // No settings descriptor initially (the caller will set it). m_pOptions = NULL; // Initialize dirty control state. m_iDirtySetup = 0; m_iDirtyCount = 0; // Set dialog validators... m_ui.ServerPortComboBox->setValidator( new QIntValidator(m_ui.ServerPortComboBox)); // Try to restore old window positioning. adjustSize(); QObject::connect(m_ui.ServerHostComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerPortComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerTimeoutSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerStartCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerCmdLineComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.StartDelaySpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLogCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLogPathComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLogPathToolButton, SIGNAL(clicked()), SLOT(browseMessagesLogPath())); QObject::connect(m_ui.DisplayFontPushButton, SIGNAL(clicked()), SLOT(chooseDisplayFont())); QObject::connect(m_ui.DisplayEffectCheckBox, SIGNAL(toggled(bool)), SLOT(toggleDisplayEffect(bool))); QObject::connect(m_ui.AutoRefreshCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.AutoRefreshTimeSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxVolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesFontPushButton, SIGNAL(clicked()), SLOT(chooseMessagesFont())); QObject::connect(m_ui.MessagesLimitCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLimitLinesSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ConfirmRemoveCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.KeepOnTopCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.StdoutCaptureCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxRecentFilesSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.CompletePathCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.InstrumentNamesCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.BaseFontSizeComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxVoicesSpinBox, SIGNAL(valueChanged(int)), SLOT(maxVoicesChanged(int))); QObject::connect(m_ui.MaxStreamsSpinBox, SIGNAL(valueChanged(int)), SLOT(maxStreamsChanged(int))); QObject::connect(m_ui.OkPushButton, SIGNAL(clicked()), SLOT(accept())); QObject::connect(m_ui.CancelPushButton, SIGNAL(clicked()), SLOT(reject())); } OptionsForm::~OptionsForm() { } // Populate (setup) dialog controls from settings descriptors. void OptionsForm::setup ( Options *pOptions ) { // Set reference descriptor. m_pOptions = pOptions; // Start clean. m_iDirtyCount = 0; // Avoid nested changes. m_iDirtySetup++; // Load combo box history... m_pOptions->loadComboBoxHistory(m_ui.ServerHostComboBox); m_pOptions->loadComboBoxHistory(m_ui.ServerPortComboBox); m_pOptions->loadComboBoxHistory(m_ui.ServerCmdLineComboBox); m_pOptions->loadComboBoxHistory(m_ui.MessagesLogPathComboBox); // Load Server settings... m_ui.ServerHostComboBox->setEditText(m_pOptions->sServerHost); m_ui.ServerPortComboBox->setEditText(QString::number(m_pOptions->iServerPort)); m_ui.ServerTimeoutSpinBox->setValue(m_pOptions->iServerTimeout); m_ui.ServerStartCheckBox->setChecked(m_pOptions->bServerStart); m_ui.ServerCmdLineComboBox->setEditText(m_pOptions->sServerCmdLine); m_ui.StartDelaySpinBox->setValue(m_pOptions->iStartDelay); // Logging options... m_ui.MessagesLogCheckBox->setChecked(m_pOptions->bMessagesLog); m_ui.MessagesLogPathComboBox->setEditText(m_pOptions->sMessagesLogPath); // Load Display options... QFont font; QPalette pal; // Display font. if (m_pOptions->sDisplayFont.isEmpty() || !font.fromString(m_pOptions->sDisplayFont)) font = QFont("Sans Serif", 8); m_ui.DisplayFontTextLabel->setFont(font); m_ui.DisplayFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); // Display effect. m_ui.DisplayEffectCheckBox->setChecked(m_pOptions->bDisplayEffect); toggleDisplayEffect(m_pOptions->bDisplayEffect); // Auto-refresh and maximum volume options. m_ui.AutoRefreshCheckBox->setChecked(m_pOptions->bAutoRefresh); m_ui.AutoRefreshTimeSpinBox->setValue(m_pOptions->iAutoRefreshTime); m_ui.MaxVolumeSpinBox->setValue(m_pOptions->iMaxVolume); // Messages font. if (m_pOptions->sMessagesFont.isEmpty() || !font.fromString(m_pOptions->sMessagesFont)) font = QFont("Monospace", 8); pal = m_ui.MessagesFontTextLabel->palette(); pal.setColor(QPalette::Background, pal.base().color()); m_ui.MessagesFontTextLabel->setPalette(pal); m_ui.MessagesFontTextLabel->setFont(font); m_ui.MessagesFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); // Messages limit option. m_ui.MessagesLimitCheckBox->setChecked(m_pOptions->bMessagesLimit); m_ui.MessagesLimitLinesSpinBox->setValue(m_pOptions->iMessagesLimitLines); // Other options finally. m_ui.ConfirmRemoveCheckBox->setChecked(m_pOptions->bConfirmRemove); m_ui.KeepOnTopCheckBox->setChecked(m_pOptions->bKeepOnTop); m_ui.StdoutCaptureCheckBox->setChecked(m_pOptions->bStdoutCapture); m_ui.CompletePathCheckBox->setChecked(m_pOptions->bCompletePath); m_ui.InstrumentNamesCheckBox->setChecked(m_pOptions->bInstrumentNames); m_ui.MaxRecentFilesSpinBox->setValue(m_pOptions->iMaxRecentFiles); if (m_pOptions->iBaseFontSize > 0) m_ui.BaseFontSizeComboBox->setEditText(QString::number(m_pOptions->iBaseFontSize)); else m_ui.BaseFontSizeComboBox->setCurrentIndex(0); #ifndef CONFIG_LIBGIG m_ui.InstrumentNamesCheckBox->setEnabled(false); #endif bMaxVoicesModified = bMaxStreamsModified = false; #ifdef CONFIG_MAX_VOICES const bool bMaxVoicesSupported = m_pOptions->getEffectiveMaxVoices() >= 0; const bool bMaxStreamsSupported = m_pOptions->getEffectiveMaxStreams() >= 0; m_ui.MaxVoicesSpinBox->setEnabled(bMaxVoicesSupported); m_ui.MaxVoicesSpinBox->setValue(m_pOptions->getMaxVoices()); if (!bMaxVoicesSupported) m_ui.MaxVoicesSpinBox->setToolTip( tr("This parameter is not supported by the current sampler " "version in use.") ); else m_ui.MaxVoicesSpinBox->setToolTip( tr("The max. amount of voices the sampler shall process " "simultaniously.") ); m_ui.MaxStreamsSpinBox->setEnabled(bMaxStreamsSupported); m_ui.MaxStreamsSpinBox->setValue(m_pOptions->getMaxStreams()); if (!bMaxStreamsSupported) m_ui.MaxStreamsSpinBox->setToolTip( tr("This parameter is not supported by the current sampler " "version in use.") ); else m_ui.MaxStreamsSpinBox->setToolTip( tr("The max. amount of disk streams the sampler shall process " "simultaniously.") ); #else m_ui.MaxVoicesSpinBox->setEnabled(false); m_ui.MaxStreamsSpinBox->setEnabled(false); m_ui.MaxVoicesSpinBox->setToolTip( tr("QSampler was built without support for this parameter.") ); m_ui.MaxStreamsSpinBox->setToolTip( tr("QSampler was built without support for this parameter.") ); #endif // CONFIG_MAX_VOICES // Done. m_iDirtySetup--; stabilizeForm(); } // Accept settings (OK button slot). void OptionsForm::accept (void) { // Save options... if (m_iDirtyCount > 0) { // Server settings.... m_pOptions->sServerHost = m_ui.ServerHostComboBox->currentText().trimmed(); m_pOptions->iServerPort = m_ui.ServerPortComboBox->currentText().toInt(); m_pOptions->iServerTimeout = m_ui.ServerTimeoutSpinBox->value(); m_pOptions->bServerStart = m_ui.ServerStartCheckBox->isChecked(); m_pOptions->sServerCmdLine = m_ui.ServerCmdLineComboBox->currentText().trimmed(); m_pOptions->iStartDelay = m_ui.StartDelaySpinBox->value(); // Logging options... m_pOptions->bMessagesLog = m_ui.MessagesLogCheckBox->isChecked(); m_pOptions->sMessagesLogPath = m_ui.MessagesLogPathComboBox->currentText(); // Channels options... m_pOptions->sDisplayFont = m_ui.DisplayFontTextLabel->font().toString(); m_pOptions->bDisplayEffect = m_ui.DisplayEffectCheckBox->isChecked(); m_pOptions->bAutoRefresh = m_ui.AutoRefreshCheckBox->isChecked(); m_pOptions->iAutoRefreshTime = m_ui.AutoRefreshTimeSpinBox->value(); m_pOptions->iMaxVolume = m_ui.MaxVolumeSpinBox->value(); // Messages options... m_pOptions->sMessagesFont = m_ui.MessagesFontTextLabel->font().toString(); m_pOptions->bMessagesLimit = m_ui.MessagesLimitCheckBox->isChecked(); m_pOptions->iMessagesLimitLines = m_ui.MessagesLimitLinesSpinBox->value(); // Other options... m_pOptions->bConfirmRemove = m_ui.ConfirmRemoveCheckBox->isChecked(); m_pOptions->bKeepOnTop = m_ui.KeepOnTopCheckBox->isChecked(); m_pOptions->bStdoutCapture = m_ui.StdoutCaptureCheckBox->isChecked(); m_pOptions->bCompletePath = m_ui.CompletePathCheckBox->isChecked(); m_pOptions->bInstrumentNames = m_ui.InstrumentNamesCheckBox->isChecked(); m_pOptions->iMaxRecentFiles = m_ui.MaxRecentFilesSpinBox->value(); m_pOptions->iBaseFontSize = m_ui.BaseFontSizeComboBox->currentText().toInt(); // Reset dirty flag. m_iDirtyCount = 0; } // if the user modified the limits, apply them to the sampler // (and store it later in qsampler's configuration) if (bMaxVoicesModified && m_ui.MaxVoicesSpinBox->isEnabled()) m_pOptions->setMaxVoices(m_ui.MaxVoicesSpinBox->value()); if (bMaxStreamsModified && m_ui.MaxStreamsSpinBox->isEnabled()) m_pOptions->setMaxStreams(m_ui.MaxStreamsSpinBox->value()); // Save combobox history... m_pOptions->saveComboBoxHistory(m_ui.ServerHostComboBox); m_pOptions->saveComboBoxHistory(m_ui.ServerPortComboBox); m_pOptions->saveComboBoxHistory(m_ui.ServerCmdLineComboBox); m_pOptions->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void OptionsForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Some settings have been changed.\n\n" "Do you want to apply the changes?"), QMessageBox::Apply | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Apply: accept(); return; case QMessageBox::Discard: break; default: // Cancel. bReject = false; } } if (bReject) QDialog::reject(); } // Dirty up settings. void OptionsForm::optionsChanged (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void OptionsForm::stabilizeForm (void) { bool bValid = (m_iDirtyCount > 0); bool bEnabled = m_ui.ServerStartCheckBox->isChecked(); m_ui.ServerCmdLineTextLabel->setEnabled(bEnabled); m_ui.ServerCmdLineComboBox->setEnabled(bEnabled); m_ui.StartDelayTextLabel->setEnabled(bEnabled); m_ui.StartDelaySpinBox->setEnabled(bEnabled); bEnabled = m_ui.MessagesLogCheckBox->isChecked(); m_ui.MessagesLogPathComboBox->setEnabled(bEnabled); m_ui.MessagesLogPathToolButton->setEnabled(bEnabled); if (bEnabled && bValid) { const QString& sPath = m_ui.MessagesLogPathComboBox->currentText(); bValid = !sPath.isEmpty(); } m_ui.AutoRefreshTimeSpinBox->setEnabled( m_ui.AutoRefreshCheckBox->isChecked()); m_ui.MessagesLimitLinesSpinBox->setEnabled( m_ui.MessagesLimitCheckBox->isChecked()); m_ui.OkPushButton->setEnabled(bValid); } // Messages log path browse slot. void OptionsForm::browseMessagesLogPath (void) { QString sFileName = QFileDialog::getSaveFileName( this, // Parent. tr("Messages Log"), // Caption. m_ui.MessagesLogPathComboBox->currentText(), // Start here. tr("Log files") + " (*.log)" // Filter (log files) ); if (!sFileName.isEmpty()) { m_ui.MessagesLogPathComboBox->setEditText(sFileName); m_ui.MessagesLogPathComboBox->setFocus(); optionsChanged(); } } // The channel display font selection dialog. void OptionsForm::chooseDisplayFont (void) { bool bOk = false; QFont font = QFontDialog::getFont(&bOk, m_ui.DisplayFontTextLabel->font(), this); if (bOk) { m_ui.DisplayFontTextLabel->setFont(font); m_ui.DisplayFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); optionsChanged(); } } // The messages font selection dialog. void OptionsForm::chooseMessagesFont (void) { bool bOk = false; QFont font = QFontDialog::getFont(&bOk, m_ui.MessagesFontTextLabel->font(), this); if (bOk) { m_ui.MessagesFontTextLabel->setFont(font); m_ui.MessagesFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); optionsChanged(); } } // The channel display effect demo changer. void OptionsForm::toggleDisplayEffect ( bool bOn ) { QPalette pal; pal.setColor(QPalette::Foreground, Qt::green); if (bOn) { QPixmap pm(":/icons/displaybg1.png"); pal.setBrush(QPalette::Background, QBrush(pm)); } else { pal.setColor(QPalette::Background, Qt::black); } m_ui.DisplayFontTextLabel->setPalette(pal); optionsChanged(); } void OptionsForm::maxVoicesChanged(int /*iMaxVoices*/) { bMaxVoicesModified = true; optionsChanged(); } void OptionsForm::maxStreamsChanged(int /*iMaxStreams*/) { bMaxStreamsModified = true; optionsChanged(); } } // namespace QSampler // end of qsamplerOptionsForm.cpp qsampler-0.2.2/src/qsamplerChannel.h0000644000175000017500000001642010725741144017304 0ustar alessioalessio// qsamplerChannel.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerChannel_h #define __qsamplerChannel_h #include #include #include #include #include "qsamplerOptions.h" namespace QSampler { class Device; // Typedef'd QMap. typedef QMap ChannelRoutingMap; //------------------------------------------------------------------------- // QSampler::Channel - Sampler channel structure. // class Channel { public: // Constructor. Channel(int iChannelID = -1); // Default destructor. ~Channel(); // Add/remove sampler channel methods. bool addChannel(); bool removeChannel(); // Sampler channel ID accessors. int channelID() const; void setChannelID(int iChannelID); // Readable channel name. QString channelName() const; // Engine name property. const QString& engineName() const; bool loadEngine(const QString& sEngineName); // Instrument file and index. const QString& instrumentFile() const; int instrumentNr() const; const QString& instrumentName() const; int instrumentStatus() const; // Instrument file loader. bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); // Special instrument file/name/number settler. bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); // MIDI input driver (DEPRECATED). const QString& midiDriver() const; bool setMidiDriver(const QString& sMidiDriver); // MIDI input device. int midiDevice() const; bool setMidiDevice(int iMidiDevice); // MIDI input port. int midiPort() const; bool setMidiPort(int iMidiPort); // MIDI input channel. int midiChannel() const; bool setMidiChannel(int iMidiChannel); // MIDI instrument map. int midiMap() const; bool setMidiMap(int iMidiMap); // Audio output driver (DEPRECATED). const QString& audioDriver() const; bool setAudioDriver(const QString& sAudioDriver); // Audio output device. int audioDevice() const; bool setAudioDevice(int iAudioDevice); // Sampler channel volume. float volume() const; bool setVolume(float fVolume); // Sampler channel mute state. bool channelMute() const; bool setChannelMute(bool bMute); // Sampler channel solo state. bool channelSolo() const; bool setChannelSolo(bool bSolo); // Audio routing accessors. int audioChannel(int iAudioOut) const; bool setAudioChannel(int iAudioOut, int iAudioIn); // The audio routing map itself. const ChannelRoutingMap& audioRouting() const; // Istrument name remapper. void updateInstrumentName(); // Channel info structure map executive. bool updateChannelInfo(); // Channel setup dialog form. bool channelSetup(QWidget *pParent); // Reset channel method. bool channelReset(); // Spawn instrument editor method. bool editChannel(); // Message logging methods (brainlessly mapped to main form's). void appendMessages (const QString & s) const; void appendMessagesColor (const QString & s, const QString & c) const; void appendMessagesText (const QString & s) const; void appendMessagesError (const QString & s) const; void appendMessagesClient (const QString & s) const; // Context menu event handler. void contextMenuEvent(QContextMenuEvent *pEvent); // Common (invalid) name-helpers. static QString noEngineName(); static QString noInstrumentName(); static QString loadingInstrument(); // Check whether a given file is an instrument file. static bool isInstrumentFile (const QString& sInstrumentFile); // Retrieve the available instrument name(s) of an instrument file (.gig). static QString getInstrumentName (const QString& sInstrumentFile, int iInstrumentNr, bool bInstrumentNames); static QStringList getInstrumentList (const QString& sInstrumentFile, bool bInstrumentNames); private: // Unique channel identifier. int m_iChannelID; // Sampler channel info map. QString m_sEngineName; QString m_sInstrumentName; QString m_sInstrumentFile; int m_iInstrumentNr; int m_iInstrumentStatus; QString m_sMidiDriver; int m_iMidiDevice; int m_iMidiPort; int m_iMidiChannel; int m_iMidiMap; QString m_sAudioDriver; int m_iAudioDevice; float m_fVolume; bool m_bMute; bool m_bSolo; // The audio routing mapping. ChannelRoutingMap m_audioRouting; }; //------------------------------------------------------------------------- // QSampler::ChannelRoutingModel - data model for audio routing // (used for QTableView) // struct ChannelRoutingItem { QStringList options; int selection; }; class ChannelRoutingModel : public QAbstractTableModel { Q_OBJECT public: ChannelRoutingModel(QObject* pParent = NULL); // overridden methods from subclass(es) int rowCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex()) const; Qt::ItemFlags flags(const QModelIndex& index) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; // own methods ChannelRoutingMap routingMap() const { return m_routing; } void clear() { m_routing.clear(); } public slots: void refresh(Device *pDevice, const ChannelRoutingMap& routing); private: Device *m_pDevice; ChannelRoutingMap m_routing; }; //------------------------------------------------------------------------- // QSampler::ChannelRoutingDelegate - table cell renderer for audio routing // class ChannelRoutingDelegate : public QItemDelegate { Q_OBJECT public: ChannelRoutingDelegate(QObject* pParent = NULL); QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *pEditor, const QModelIndex& index) const; void setModelData(QWidget *pEditor, QAbstractItemModel* model, const QModelIndex& index) const; void updateEditorGeometry(QWidget *pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; } // namespace QSampler // So we can use it i.e. through QVariant Q_DECLARE_METATYPE(QSampler::ChannelRoutingItem) #endif // __qsamplerChannel_h // end of qsamplerChannel.h qsampler-0.2.2/src/qsamplerInstrumentListForm.ui0000644000175000017500000001034111147243071021741 0ustar alessioalessio rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsamplerInstrumentListForm 0 0 720 340 Qsampler: Instruments :/icons/qsamplerInstrument.png 0 0 true QAbstractItemView::SelectRows Qt::Horizontal 4 &Context :/icons/itemNew.png New &Instrument... New Insert :/icons/formEdit.png &Edit... Edit Enter :/icons/formRemove.png &Delete Delete Delete :/icons/formRefresh.png &Refresh Refresh F5 qsampler-0.2.2/src/qsamplerMainForm.h0000644000175000017500000001147511147243071017444 0ustar alessioalessio// qsamplerMainForm.h // /**************************************************************************** Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsamplerMainForm_h #define __qsamplerMainForm_h #include "ui_qsamplerMainForm.h" #include class QProcess; class QWorkspace; class QSpinBox; class QSlider; class QLabel; namespace QSampler { class Options; class Messages; class Channel; class ChannelStrip; class DeviceForm; class InstrumentListForm; //------------------------------------------------------------------------- // QSampler::MainForm -- Main window form implementation. // class MainForm : public QMainWindow { Q_OBJECT public: MainForm(QWidget *pParent = NULL); ~MainForm(); void setup(Options* pOptions); Options* options() const; lscp_client_t* client() const; QString sessionName(const QString& sFilename); void appendMessages(const QString& s); void appendMessagesColor(const QString& s, const QString& c); void appendMessagesText(const QString& s); void appendMessagesError(const QString& s); void appendMessagesClient(const QString& s); ChannelStrip* createChannelStrip(Channel *pChannel); void destroyChannelStrip(ChannelStrip* pChannelStrip); ChannelStrip* activeChannelStrip(); ChannelStrip* channelStripAt(int iChannel); ChannelStrip* channelStrip(int iChannelID); void contextMenuEvent(QContextMenuEvent *pEvent); static MainForm* getInstance(); public slots: void fileNew(); void fileOpen(); void fileOpenRecent(); void fileSave(); void fileSaveAs(); void fileReset(); void fileRestart(); void fileExit(); void editAddChannel(); void editRemoveChannel(); void editSetupChannel(); void editEditChannel(); void editResetChannel(); void editResetAllChannels(); void viewMenubar(bool bOn); void viewToolbar(bool bOn); void viewStatusbar(bool bOn); void viewMessages(bool bOn); void viewInstruments(); void viewDevices(); void viewOptions(); void channelsArrange(); void channelsAutoArrange(bool bOn); void helpAboutQt(); void helpAbout(); void volumeChanged(int iVolume); void channelStripChanged(ChannelStrip *pChannelStrip); void channelsMenuAboutToShow(); void channelsMenuActivated(); void timerSlot(); void readServerStdout(); void processServerExit(); void sessionDirty(); void stabilizeForm(); protected slots: void updateRecentFilesMenu(); // Channel strip activation/selection. void activateStrip(QWidget *pWidget); protected: bool queryClose(); void closeEvent(QCloseEvent* pCloseEvent); void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); void dropEvent(QDropEvent *pDropEvent); void customEvent(QEvent* pCustomEvent); bool newSession(); bool openSession(); bool saveSession(bool bPrompt); bool closeSession(bool bForce); bool loadSessionFile(const QString& sFilename); bool saveSessionFile(const QString& sFilename); void updateSession(); void updateRecentFiles(const QString& sFilename); void updateInstrumentNames(); void updateDisplayFont(); void updateDisplayEffect(); void updateMaxVolume(); void updateMessagesFont(); void updateMessagesLimit(); void updateMessagesCapture(); void updateViewMidiDeviceStatusMenu(); void updateAllChannelStrips(bool bRemoveDeadStrips); void startSchedule(int iStartDelay); void stopSchedule(); void startServer(); void stopServer(bool bInteractive = false); bool startClient(); void stopClient(); private: Ui::qsamplerMainForm m_ui; Options *m_pOptions; Messages *m_pMessages; QWorkspace *m_pWorkspace; QString m_sFilename; int m_iUntitled; int m_iDirtyCount; lscp_client_t *m_pClient; QProcess *m_pServer; bool bForceServerStop; int m_iStartDelay; int m_iTimerDelay; int m_iTimerSlot; QLabel *m_statusItem[5]; QList m_changedStrips; InstrumentListForm *m_pInstrumentListForm; DeviceForm *m_pDeviceForm; static MainForm *g_pMainForm; QSlider *m_pVolumeSlider; QSpinBox *m_pVolumeSpinBox; int m_iVolumeChanging; }; } // namespace QSampler #endif // __qsamplerMainForm_h // end of qsamplerMainForm.h qsampler-0.2.2/AUTHORS0000644000175000017500000000013710712404555014273 0ustar alessioalessioRui Nuno Capela Christian Schoenebeck qsampler-0.2.2/INSTALL0000644000175000017500000001547207750310046014263 0ustar alessioalessioBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. 4. You can remove the program binaries and object files from the source code directory by typing `make clean'. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. qsampler-0.2.2/configure0000755000175000017500000062165411236104774015151 0ustar alessioalessio#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for Qsampler 0.2.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Qsampler' PACKAGE_TARNAME='qsampler' PACKAGE_VERSION='0.2.2' PACKAGE_STRING='Qsampler 0.2.2' PACKAGE_BUGREPORT='rncbc@rncbc.org' ac_unique_file="src/qsamplerMainForm.ui" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias ac_prefix ac_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CXX CXXFLAGS ac_ct_CXX CXXCPP GREP EGREP ac_qmake ac_moc ac_uic ac_lupdate ac_lrelease ac_libs ac_incpath LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Qsampler 0.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/qsampler] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Qsampler 0.2.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug enable debugging (default=no) --enable-libgig enable libgig interface (default=yes) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-qt=PATH use alternate Qt install path --with-liblscp=PATH use alternate liblscp install path --with-libgig=PATH use alternate libgig install path Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Qsampler configure 0.2.2 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Qsampler $as_me 0.2.2, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_config_files="$ac_config_files Makefile qsampler.pro qsampler.spec qsampler.desktop" # Set default installation prefix. ac_prefix=$prefix if test "x$ac_prefix" = "xNONE"; then ac_prefix=$ac_default_prefix fi cat >>confdefs.h <<_ACEOF #define CONFIG_PREFIX "$ac_prefix" _ACEOF # Enable debugging argument option. # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; ac_debug="$enableval" fi if test "x$ac_debug" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_DEBUG 1 _ACEOF ac_debug="debug" else ac_debug="release" fi # Enable libgig availability. # Check whether --enable-libgig was given. if test "${enable_libgig+set}" = set; then enableval=$enable_libgig; ac_libgig="$enableval" else ac_libgig="yes" fi # Standard installation base dirs. ac_with_paths="/usr /usr/local" # Some a-la-debian alternatives... for X in /usr/lib /usr/lib64 /usr/share; do for Y in qt qt4; do if test -d $X/$Y/bin; then ac_with_paths="$ac_with_paths $X/$Y" fi done done # Set for alternate Qt installation dir. # Check whether --with-qt was given. if test "${with_qt+set}" = set; then withval=$with_qt; ac_with_paths="$ac_with_paths $withval" fi # Set for alternate liblscp installation dir. # Check whether --with-liblscp was given. if test "${with_liblscp+set}" = set; then withval=$with_liblscp; ac_with_paths="$ac_with_paths $withval" fi # Set for alternate libgig installation dir. # Check whether --with-libgig was given. if test "${with_libgig+set}" = set; then withval=$with_libgig; ac_with_paths="$ac_with_paths $withval" fi # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" if test $ac_cv_c_compiler_gnu = yes; then { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi # Checks for languages. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Prepend alternate dependencies paths. ac_path=$PATH for X in $ac_with_paths; do if test -d $X/bin; then ac_path="$X/bin:$ac_path" fi if test -x $X/qmake; then ac_path="$X:$ac_path" fi if test -d $X/include; then for Y in qt qt4; do if test -d $X/include/$Y; then CFLAGS="-I$X/include/$Y $CFLAGS" CPPFLAGS="-I$X/include/$Y $CPPFLAGS" ac_incpath="$X/include/$Y $ac_incpath" fi done CFLAGS="-I$X/include $CFLAGS" CPPFLAGS="-I$X/include $CPPFLAGS" ac_incpath="$X/include $ac_incpath" fi if test -d $X/lib64; then LIBS="-L$X/lib64 $LIBS" ac_libs="-L$X/lib64 $ac_libs" fi if test -d $X/lib; then LIBS="-L$X/lib $LIBS" ac_libs="-L$X/lib $ac_libs" fi done # Check for proper Qt version. { echo "$as_me:$LINENO: checking for Qt library version >= 4.1" >&5 echo $ECHO_N "checking for Qt library version >= 4.1... $ECHO_C" >&6; } if test "${ac_cv_qtversion+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "Qt/qglobal.h" int main () { #if QT_VERSION < 0x040100 #error Qt library 4.1 or greater required. #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_qtversion="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "no; Qt 4.1 or greater is required" exit fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_qtversion" >&5 echo "${ECHO_T}$ac_cv_qtversion" >&6; } # A common error message: ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." # Check for Qt qmake utility. # Extract the first word of "qmake", so it can be a program name with args. set dummy qmake; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_qmake+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_qmake in [\\/]* | ?:[\\/]*) ac_cv_path_ac_qmake="$ac_qmake" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_qmake="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ac_qmake" && ac_cv_path_ac_qmake="no" ;; esac fi ac_qmake=$ac_cv_path_ac_qmake if test -n "$ac_qmake"; then { echo "$as_me:$LINENO: result: $ac_qmake" >&5 echo "${ECHO_T}$ac_qmake" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_qmake" = "xno"; then { { echo "$as_me:$LINENO: error: qmake $ac_errmsg" >&5 echo "$as_me: error: qmake $ac_errmsg" >&2;} { (exit 1); exit 1; }; } fi # Check for Qt moc utility. # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_moc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_moc in [\\/]* | ?:[\\/]*) ac_cv_path_ac_moc="$ac_moc" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_moc="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ac_moc" && ac_cv_path_ac_moc="no" ;; esac fi ac_moc=$ac_cv_path_ac_moc if test -n "$ac_moc"; then { echo "$as_me:$LINENO: result: $ac_moc" >&5 echo "${ECHO_T}$ac_moc" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_moc" = "xno"; then { { echo "$as_me:$LINENO: error: moc $ac_errmsg" >&5 echo "$as_me: error: moc $ac_errmsg" >&2;} { (exit 1); exit 1; }; } fi # Check for Qt uic utility. # Extract the first word of "uic", so it can be a program name with args. set dummy uic; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_uic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_uic in [\\/]* | ?:[\\/]*) ac_cv_path_ac_uic="$ac_uic" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_uic="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ac_uic" && ac_cv_path_ac_uic="no" ;; esac fi ac_uic=$ac_cv_path_ac_uic if test -n "$ac_uic"; then { echo "$as_me:$LINENO: result: $ac_uic" >&5 echo "${ECHO_T}$ac_uic" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_uic" = "xno"; then { { echo "$as_me:$LINENO: error: uic $ac_errmsg" >&5 echo "$as_me: error: uic $ac_errmsg" >&2;} { (exit 1); exit 1; }; } fi # Check for Qt lupdate utility. # Extract the first word of "lupdate", so it can be a program name with args. set dummy lupdate; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_lupdate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_lupdate in [\\/]* | ?:[\\/]*) ac_cv_path_ac_lupdate="$ac_lupdate" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_lupdate="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ac_lupdate" && ac_cv_path_ac_lupdate="no" ;; esac fi ac_lupdate=$ac_cv_path_ac_lupdate if test -n "$ac_lupdate"; then { echo "$as_me:$LINENO: result: $ac_lupdate" >&5 echo "${ECHO_T}$ac_lupdate" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_lupdate" = "xno"; then { { echo "$as_me:$LINENO: error: lupdate $ac_errmsg" >&5 echo "$as_me: error: lupdate $ac_errmsg" >&2;} { (exit 1); exit 1; }; } fi # Check for Qt lrelease utility. # Extract the first word of "lrelease", so it can be a program name with args. set dummy lrelease; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_lrelease+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_lrelease in [\\/]* | ?:[\\/]*) ac_cv_path_ac_lrelease="$ac_lrelease" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_lrelease="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ac_lrelease" && ac_cv_path_ac_lrelease="no" ;; esac fi ac_lrelease=$ac_cv_path_ac_lrelease if test -n "$ac_lrelease"; then { echo "$as_me:$LINENO: result: $ac_lrelease" >&5 echo "${ECHO_T}$ac_lrelease" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_release" = "xno"; then { { echo "$as_me:$LINENO: error: lrelease $ac_errmsg" >&5 echo "$as_me: error: lrelease $ac_errmsg" >&2;} { (exit 1); exit 1; }; } fi # Checks for libraries. { echo "$as_me:$LINENO: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { echo "$as_me:$LINENO: checking for main in -lX11" >&5 echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6; } if test "${ac_cv_lib_X11_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_X11_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_X11_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 echo "${ECHO_T}$ac_cv_lib_X11_main" >&6; } if test $ac_cv_lib_X11_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" fi { echo "$as_me:$LINENO: checking for main in -lXext" >&5 echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } if test "${ac_cv_lib_Xext_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xext_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } if test $ac_cv_lib_Xext_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF LIBS="-lXext $LIBS" fi # Check for round math function. { echo "$as_me:$LINENO: checking for round in -lm" >&5 echo $ECHO_N "checking for round in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_round+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char round (); int main () { return round (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_round=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_round=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_round" >&5 echo "${ECHO_T}$ac_cv_lib_m_round" >&6; } if test $ac_cv_lib_m_round = yes; then ac_round="yes" else ac_round="no" fi if test "x$ac_round" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_ROUND 1 _ACEOF fi # Check for mandatory libraries. { echo "$as_me:$LINENO: checking for main in -llscp" >&5 echo $ECHO_N "checking for main in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_main" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_main" >&6; } if test $ac_cv_lib_lscp_main = yes; then ac_liblscp="yes" else ac_liblscp="no" fi if test "x$ac_liblscp" = "xno"; then { { echo "$as_me:$LINENO: error: LSCP library not found." >&5 echo "$as_me: error: LSCP library not found." >&2;} { (exit 1); exit 1; }; } fi ac_libs="$ac_libs -llscp" { echo "$as_me:$LINENO: checking for instrument_name in lscp_channel_info_t" >&5 echo $ECHO_N "checking for instrument_name in lscp_channel_info_t... $ECHO_C" >&6; } if test "${ac_cv_instrument_name+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; info.instrument_name = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_instrument_name="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_instrument_name="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_instrument_name" >&5 echo "${ECHO_T}$ac_cv_instrument_name" >&6; } ac_instrument_name=$ac_cv_instrument_name if test "x$ac_instrument_name" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_INSTRUMENT_NAME 1 _ACEOF fi { echo "$as_me:$LINENO: checking for mute/solo in lscp_channel_info_t" >&5 echo $ECHO_N "checking for mute/solo in lscp_channel_info_t... $ECHO_C" >&6; } if test "${ac_cv_mute_solo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; info.mute = 0; info.solo = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_mute_solo="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_mute_solo="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_mute_solo" >&5 echo "${ECHO_T}$ac_cv_mute_solo" >&6; } ac_mute_solo=$ac_cv_mute_solo if test "x$ac_mute_solo" = "xyes"; then { echo "$as_me:$LINENO: checking for lscp_set_channel_mute in -llscp" >&5 echo $ECHO_N "checking for lscp_set_channel_mute in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_set_channel_mute+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_set_channel_mute (); int main () { return lscp_set_channel_mute (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_set_channel_mute=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_set_channel_mute=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_set_channel_mute" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_set_channel_mute" >&6; } if test $ac_cv_lib_lscp_lscp_set_channel_mute = yes; then ac_mute_solo="yes" else ac_mute_solo="no" fi fi if test "x$ac_mute_solo" = "xyes"; then { echo "$as_me:$LINENO: checking for lscp_set_channel_solo in -llscp" >&5 echo $ECHO_N "checking for lscp_set_channel_solo in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_set_channel_solo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_set_channel_solo (); int main () { return lscp_set_channel_solo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_set_channel_solo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_set_channel_solo=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_set_channel_solo" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_set_channel_solo" >&6; } if test $ac_cv_lib_lscp_lscp_set_channel_solo = yes; then ac_mute_solo="yes" else ac_mute_solo="no" fi fi if test "x$ac_mute_solo" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_MUTE_SOLO 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_map_midi_instrument in -llscp" >&5 echo $ECHO_N "checking for lscp_map_midi_instrument in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_map_midi_instrument+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_map_midi_instrument (); int main () { return lscp_map_midi_instrument (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_map_midi_instrument=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_map_midi_instrument=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_map_midi_instrument" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_map_midi_instrument" >&6; } if test $ac_cv_lib_lscp_lscp_map_midi_instrument = yes; then ac_midi_instrument="yes" else ac_midi_instrument="no" fi if test "x$ac_midi_instrument" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_MIDI_INSTRUMENT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_create_fxsend in -llscp" >&5 echo $ECHO_N "checking for lscp_create_fxsend in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_create_fxsend+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_create_fxsend (); int main () { return lscp_create_fxsend (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_create_fxsend=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_create_fxsend=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_create_fxsend" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_create_fxsend" >&6; } if test $ac_cv_lib_lscp_lscp_create_fxsend = yes; then ac_fxsend="yes" else ac_fxsend="no" fi if test "x$ac_fxsend" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_FXSEND 1 _ACEOF { echo "$as_me:$LINENO: checking for FX send level in lscp_fxsend_info_t" >&5 echo $ECHO_N "checking for FX send level in lscp_fxsend_info_t... $ECHO_C" >&6; } if test "${ac_cv_fxsend_level+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_fxsend_info_t info; info.level = 0.0f; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_fxsend_level="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_fxsend_level="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_fxsend_level" >&5 echo "${ECHO_T}$ac_cv_fxsend_level" >&6; } ac_fxsend_level=$ac_cv_fxsend_level if test "x$ac_fxsend_level" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_FXSEND_LEVEL 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_set_fxsend_name in -llscp" >&5 echo $ECHO_N "checking for lscp_set_fxsend_name in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_set_fxsend_name+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_set_fxsend_name (); int main () { return lscp_set_fxsend_name (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_set_fxsend_name=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_set_fxsend_name=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_set_fxsend_name" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_set_fxsend_name" >&6; } if test $ac_cv_lib_lscp_lscp_set_fxsend_name = yes; then ac_fxsend_rename="yes" else ac_fxsend_rename="no" fi if test "x$ac_fxsend_rename" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_FXSEND_RENAME 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking for audio_routing array type" >&5 echo $ECHO_N "checking for audio_routing array type... $ECHO_C" >&6; } if test "${ac_cv_audio_routing+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; char ch = info.audio_routing[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_audio_routing="no" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_audio_routing="yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_audio_routing" >&5 echo "${ECHO_T}$ac_cv_audio_routing" >&6; } ac_audio_routing=$ac_cv_audio_routing if test "x$ac_audio_routing" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_AUDIO_ROUTING 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_set_volume in -llscp" >&5 echo $ECHO_N "checking for lscp_set_volume in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_set_volume+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_set_volume (); int main () { return lscp_set_volume (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_set_volume=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_set_volume=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_set_volume" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_set_volume" >&6; } if test $ac_cv_lib_lscp_lscp_set_volume = yes; then ac_volume="yes" else ac_volume="no" fi if test "x$ac_volume" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_VOLUME 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_edit_channel_instrument in -llscp" >&5 echo $ECHO_N "checking for lscp_edit_channel_instrument in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_edit_channel_instrument+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_edit_channel_instrument (); int main () { return lscp_edit_channel_instrument (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_edit_channel_instrument=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_edit_channel_instrument=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_edit_channel_instrument" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_edit_channel_instrument" >&6; } if test $ac_cv_lib_lscp_lscp_edit_channel_instrument = yes; then ac_edit_instrument="yes" else ac_edit_instrument="no" fi if test "x$ac_edit_instrument" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_EDIT_INSTRUMENT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for CHANNEL_MIDI LSCP event support in liblscp" >&5 echo $ECHO_N "checking for CHANNEL_MIDI LSCP event support in liblscp... $ECHO_C" >&6; } if test "${ac_cv_channel_midi_event+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" #include "lscp/event.h" int main () { lscp_event_t ev; ev = LSCP_EVENT_CHANNEL_MIDI; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_channel_midi_event="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_channel_midi_event="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_channel_midi_event" >&5 echo "${ECHO_T}$ac_cv_channel_midi_event" >&6; } ac_channel_midi_event=$ac_cv_channel_midi_event if test "x$ac_channel_midi_event" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_EVENT_CHANNEL_MIDI 1 _ACEOF fi { echo "$as_me:$LINENO: checking for DEVICE_MIDI LSCP event support in liblscp" >&5 echo $ECHO_N "checking for DEVICE_MIDI LSCP event support in liblscp... $ECHO_C" >&6; } if test "${ac_cv_device_midi_event+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "lscp/client.h" #include "lscp/event.h" int main () { lscp_event_t ev; ev = LSCP_EVENT_DEVICE_MIDI; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_device_midi_event="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_device_midi_event="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_device_midi_event" >&5 echo "${ECHO_T}$ac_cv_device_midi_event" >&6; } ac_device_midi_event=$ac_cv_device_midi_event if test "x$ac_device_midi_event" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_EVENT_DEVICE_MIDI 1 _ACEOF fi { echo "$as_me:$LINENO: checking for lscp_get_voices in -llscp" >&5 echo $ECHO_N "checking for lscp_get_voices in -llscp... $ECHO_C" >&6; } if test "${ac_cv_lib_lscp_lscp_get_voices+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lscp_get_voices (); int main () { return lscp_get_voices (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lscp_lscp_get_voices=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lscp_lscp_get_voices=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lscp_lscp_get_voices" >&5 echo "${ECHO_T}$ac_cv_lib_lscp_lscp_get_voices" >&6; } if test $ac_cv_lib_lscp_lscp_get_voices = yes; then ac_max_voices="yes" else ac_max_voices="no" fi if test "x$ac_max_voices" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_MAX_VOICES 1 _ACEOF fi # Check for optional libraries. if test "x$ac_libgig" = "xyes"; then { echo "$as_me:$LINENO: checking for main in -lgig" >&5 echo $ECHO_N "checking for main in -lgig... $ECHO_C" >&6; } if test "${ac_cv_lib_gig_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgig $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gig_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gig_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gig_main" >&5 echo "${ECHO_T}$ac_cv_lib_gig_main" >&6; } if test $ac_cv_lib_gig_main = yes; then ac_libgig="yes" else ac_libgig="no" fi if test "x$ac_libgig" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_LIBGIG 1 _ACEOF ac_libs="$ac_libs -lgig" { echo "$as_me:$LINENO: checking for gig::File::SetAutoLoad() method in libgig" >&5 echo $ECHO_N "checking for gig::File::SetAutoLoad() method in libgig... $ECHO_C" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CXXFLAGS="$ac_libs" if test "$cross_compiling" = yes; then have_libgig_setautoload="no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main() { gig::File file; file.SetAutoLoad(false); exit(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then have_libgig_setautoload="yes" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) have_libgig_setautoload="no" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: result: $have_libgig_setautoload" >&5 echo "${ECHO_T}$have_libgig_setautoload" >&6; } if test "x$have_libgig_setautoload" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBGIG_SETAUTOLOAD 1 _ACEOF fi fi fi # Check for round math function. { echo "$as_me:$LINENO: checking for lroundf in -lm" >&5 echo $ECHO_N "checking for lroundf in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_lroundf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lroundf (); int main () { return lroundf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_lroundf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_lroundf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_lroundf" >&5 echo "${ECHO_T}$ac_cv_lib_m_lroundf" >&6; } if test $ac_cv_lib_m_lroundf = yes; then ac_round="yes" else ac_round="no" fi if test "x$ac_round" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define CONFIG_ROUND 1 _ACEOF fi # Checks for header files. { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h sys/ioctl.h unistd.h signal.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------ ## ## Report this to rncbc@rncbc.org ## ## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_lscp_client_h+set}" = set; then { echo "$as_me:$LINENO: checking for lscp/client.h" >&5 echo $ECHO_N "checking for lscp/client.h... $ECHO_C" >&6; } if test "${ac_cv_header_lscp_client_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_lscp_client_h" >&5 echo "${ECHO_T}$ac_cv_header_lscp_client_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking lscp/client.h usability" >&5 echo $ECHO_N "checking lscp/client.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking lscp/client.h presence" >&5 echo $ECHO_N "checking lscp/client.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: lscp/client.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: lscp/client.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: lscp/client.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: lscp/client.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: lscp/client.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: lscp/client.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: lscp/client.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: lscp/client.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: lscp/client.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: lscp/client.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: lscp/client.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------ ## ## Report this to rncbc@rncbc.org ## ## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for lscp/client.h" >&5 echo $ECHO_N "checking for lscp/client.h... $ECHO_C" >&6; } if test "${ac_cv_header_lscp_client_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_lscp_client_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_lscp_client_h" >&5 echo "${ECHO_T}$ac_cv_header_lscp_client_h" >&6; } fi if test $ac_cv_header_lscp_client_h = yes; then ac_lscp_h="yes" else ac_lscp_h="no" fi if test "x$ac_lscp_h" = "xno"; then { { echo "$as_me:$LINENO: error: LSCP headers not found." >&5 echo "$as_me: error: LSCP headers not found." >&2;} { (exit 1); exit 1; }; } fi # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST # Checks for library functions. for ac_func in system do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Finally produce a configure header file and the makefiles. cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Qsampler $as_me 0.2.2, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ Qsampler config.status 0.2.2 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "qsampler.pro") CONFIG_FILES="$CONFIG_FILES qsampler.pro" ;; "qsampler.spec") CONFIG_FILES="$CONFIG_FILES qsampler.spec" ;; "qsampler.desktop") CONFIG_FILES="$CONFIG_FILES qsampler.desktop" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim ac_prefix!$ac_prefix$ac_delim ac_debug!$ac_debug$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXCPP!$CXXCPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim ac_qmake!$ac_qmake$ac_delim ac_moc!$ac_moc$ac_delim ac_uic!$ac_uic$ac_delim ac_lupdate!$ac_lupdate$ac_delim ac_lrelease!$ac_lrelease$ac_delim ac_libs!$ac_libs$ac_delim ac_incpath!$ac_incpath$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # make clean > /dev/null 2>&1 # Output summary message echo echo " $PACKAGE_NAME $PACKAGE_VERSION" echo echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" echo echo " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name" echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo" echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument" echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend" echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level" echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename" echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing" echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume" echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" if test "x$ac_libgig" = "xyes"; then echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" fi echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" echo echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" echo echo "Now type 'make', followed by 'make install' as root." echo qsampler-0.2.2/qsampler.pro.in0000644000175000017500000000344211162445325016200 0ustar alessioalessioINCPATH += ./src HEADERS = src/qsamplerAbout.h \ src/qsamplerOptions.h \ src/qsamplerChannel.h \ src/qsamplerMessages.h \ src/qsamplerInstrument.h \ src/qsamplerInstrumentList.h \ src/qsamplerDevice.h \ src/qsamplerFxSend.h \ src/qsamplerFxSendsModel.h \ src/qsamplerUtilities.h \ src/qsamplerInstrumentForm.h \ src/qsamplerInstrumentListForm.h \ src/qsamplerDeviceForm.h \ src/qsamplerDeviceStatusForm.h \ src/qsamplerChannelStrip.h \ src/qsamplerChannelForm.h \ src/qsamplerChannelFxForm.h \ src/qsamplerOptionsForm.h \ src/qsamplerMainForm.h SOURCES = src/main.cpp \ src/qsamplerOptions.cpp \ src/qsamplerChannel.cpp \ src/qsamplerMessages.cpp \ src/qsamplerInstrument.cpp \ src/qsamplerInstrumentList.cpp \ src/qsamplerDevice.cpp \ src/qsamplerFxSend.cpp \ src/qsamplerFxSendsModel.cpp \ src/qsamplerUtilities.cpp \ src/qsamplerInstrumentForm.cpp \ src/qsamplerInstrumentListForm.cpp \ src/qsamplerDeviceForm.cpp \ src/qsamplerDeviceStatusForm.cpp \ src/qsamplerChannelStrip.cpp \ src/qsamplerChannelForm.cpp \ src/qsamplerChannelFxForm.cpp \ src/qsamplerOptionsForm.cpp \ src/qsamplerMainForm.cpp FORMS = src/qsamplerInstrumentForm.ui \ src/qsamplerInstrumentListForm.ui \ src/qsamplerDeviceForm.ui \ src/qsamplerChannelStrip.ui \ src/qsamplerChannelForm.ui \ src/qsamplerChannelFxForm.ui \ src/qsamplerOptionsForm.ui \ src/qsamplerMainForm.ui RESOURCES = icons/qsampler.qrc TEMPLATE = app CONFIG += qt thread warn_on @ac_debug@ LANGUAGE = C++ TRANSLATIONS += translations/qsampler_ru.ts LIBS += @ac_libs@ INCPATH += @ac_incpath@ OBJECTS_DIR = .obj MOC_DIR = .moc UI_DIR = .ui macx { QMAKE_MAC_SDK = $$(SDKROOT) CONFIG += $$(QMAKE_ARCHS) } qsampler-0.2.2/COPYING0000644000175000017500000004310310505477167014267 0ustar alessioalessio GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. qsampler-0.2.2/Makefile.cvs0000644000175000017500000000040411124736711015452 0ustar alessioalessioall: configure configure: Makefile.in configure.ac @autoheader @autoconf @rm -rf *.cache clean: @if [ -f Makefile ]; then make clean; fi || true @rm -rvf Makefile configure config.* .ui .obj .moc @rm -rvf *.cache *.log *.status *.pro *.spec *.desktop qsampler-0.2.2/qsampler.spec.in0000644000175000017500000000615611235102774016336 0ustar alessioalessio%define name @PACKAGE_TARNAME@ %define version @PACKAGE_VERSION@ %define release 11 %define prefix @ac_prefix@ Summary: A LinuxSampler Qt GUI interface Name: %{name} Version: %{version} Release: %{release} Prefix: %{prefix} License: GPL Group: Productivity/Multimedia/Sound/Midi Source0: %{name}-%{version}.tar.gz URL: http://qsampler.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: qt >= 4.2 Requires: liblscp >= 0.5.5 Requires: libgig >= 3.2.0 BuildRequires: qt-devel >= 4.2 BuildRequires: liblscp-devel >= 0.5.5 BuildRequires: libgig-devel >= 3.2.0 %description QSampler is a LinuxSampler GUI front-end application written in C++ around the Qt3 toolkit using Qt Designer. For the moment it just wraps the client interface of LinuxSampler Control Protocol (LSCP) (http://www.linuxsampler.org). %prep %setup [ -f Makefile.cvs ] && %__make -f Makefile.cvs %build export PATH=$QTDIR/bin:$PATH %configure %__make %install %makeinstall %clean [ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog README TODO %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %{_datadir}/locale/%{name}_*.qm %changelog * Sat Aug 1 2009 Rui Nuno Capela - New 0.2.2 release. * Thu Dec 6 2007 Rui Nuno Capela - Qt4 migration complete. * Mon Jun 25 2007 Rui Nuno Capela - Application icon is now installed to (prefix)/share/pixmaps. - Declared fundamental build and run-time requirements. - Destination install directory prefix is now in spec. - Spec is now a bit more openSUSE compliant. * Mon Jan 15 2007 Rui Nuno Capela - Added sampler channel FX send support at session save code-level. - Global sampler volume slider/spinbox combo is now featured. * Thu Dec 17 2006 Rui Nuno Capela - Added preliminary MIDI instrument mapping support. * Thu Jun 01 2006 Rui Nuno Capela - Take a chance for a new 0.1.3 release. - Changed deprecated copyright attribute to license. * Wed Aug 24 2005 Rui Nuno Capela - Prepared auto-generation from configure. * Tue Aug 16 2005 Rui Nuno Capela - Get in sync with latest offerings from liblscp (0.3.1) and specially libgig (2.0.2) which broke previous ABI, somewhat. * Thu Jun 23 2005 Rui Nuno Capela - Even minor workings needs a rest. * Mon Jun 13 2005 Rui Nuno Capela - The mantra of bugfixes. * Mon May 23 2005 Rui Nuno Capela - Device configuration breakthrough. * Fri Mar 4 2005 Rui Nuno Capela - Fifth alpha-release. * Wed Nov 16 2004 Rui Nuno Capela - Prepared for the fourth alpha release. * Wed Nov 16 2004 Rui Nuno Capela - Prepared for the fourth alpha release. * Wed Jun 2 2004 Rui Nuno Capela - Created initial qsampler.spec qsampler-0.2.2/Makefile.in0000644000175000017500000000605711162445325015277 0ustar alessioalessioprefix = @ac_prefix@ qmake = @ac_qmake@ lupdate = @ac_lupdate@ lrelease = @ac_lrelease@ name = qsampler headers = config.h \ src/qsamplerAbout.h \ src/qsamplerOptions.h \ src/qsamplerChannel.h \ src/qsamplerMessages.h \ src/qsamplerInstrument.h \ src/qsamplerInstrumentList.h \ src/qsamplerDevice.h \ src/qsamplerFxSend.h \ src/qsamplerFxSendsModel.h \ src/qsamplerUtilities.h \ src/qsamplerInstrumentForm.h \ src/qsamplerInstrumentListForm.h \ src/qsamplerDeviceForm.h \ src/qsamplerDeviceStatusForm.h \ src/qsamplerChannelStrip.h \ src/qsamplerChannelForm.h \ src/qsamplerChannelFxForm.h \ src/qsamplerOptionsForm.h \ src/qsamplerMainForm.h sources = src/main.cpp \ src/qsamplerOptions.cpp \ src/qsamplerChannel.cpp \ src/qsamplerMessages.cpp \ src/qsamplerInstrument.cpp \ src/qsamplerInstrumentList.cpp \ src/qsamplerDevice.cpp \ src/qsamplerFxSend.cpp \ src/qsamplerFxSendsModel.cpp \ src/qsamplerUtilities.cpp \ src/qsamplerInstrumentForm.cpp \ src/qsamplerInstrumentListForm.cpp \ src/qsamplerDeviceForm.cpp \ src/qsamplerDeviceStatusForm.cpp \ src/qsamplerChannelStrip.cpp \ src/qsamplerChannelForm.cpp \ src/qsamplerChannelFxForm.cpp \ src/qsamplerOptionsForm.cpp \ src/qsamplerMainForm.cpp forms = \ src/qsamplerInstrumentForm.ui \ src/qsamplerInstrumentListForm.ui \ src/qsamplerDeviceForm.ui \ src/qsamplerChannelStrip.ui \ src/qsamplerChannelForm.ui \ src/qsamplerChannelFxForm.ui \ src/qsamplerOptionsForm.ui \ src/qsamplerMainForm.ui translations_sources = \ translations/qsampler_ru.ts translations_targets = \ translations/qsampler_ru.qm all: $(name) $(translations_targets) $(name).mak: $(name).pro @$(qmake) -o $(name).mak $(name).pro $(name): $(name).mak $(sources) $(headers) $(forms) @make -f $(name).mak %.ts: $(name).pro $(sources) $(headers) $(forms) @$(lupdate) -verbose $(name).pro %.qm: %.ts @$(lrelease) -verbose $< -qm $@ # NOTE: DO NOT DELETE $(DESTDIR) in install and uninstall rules !!! # It is mandatory for Debian packaging. install: $(name) icons/$(name).png @install -d -v -m 0755 $(DESTDIR)$(prefix)/bin @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/pixmaps @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/applications @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/locale @install -v -m 0755 $(name) $(DESTDIR)$(prefix)/bin/$(name) @install -v -m 0644 icons/$(name).png $(DESTDIR)$(prefix)/share/pixmaps/$(name).png @install -v -m 0644 $(name).desktop $(DESTDIR)$(prefix)/share/applications/$(name).desktop @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/locale uninstall: $(DESTDIR)$(prefix)/bin/$(name) @rm -vf $(DESTDIR)$(prefix)/bin/$(name) @rm -vf $(DESTDIR)$(prefix)/share/pixmaps/$(name).png @rm -vf $(DESTDIR)$(prefix)/share/applications/$(name).desktop @rm -vf $(DESTDIR)$(prefix)/share/locale/$(translations_targets) @for x in $(translations_targets); do \ rm -vf $(DESTDIR)$(prefix)/share/locale/`basename $$x`; done clean: $(name).mak @make -f $(name).mak clean @rm -f $(name) $(name).mak @rm -rf *.cache *.log *.status $(translations_targets) qsampler-0.2.2/icons/0000755000175000017500000000000011236104755014336 5ustar alessioalessioqsampler-0.2.2/icons/itemGroupNew.png0000644000175000017500000000143210550473436017474 0ustar alessioalessioPNG  IHDRabKGD pHYs  tIME &3JIDATx}KlLQsw,!JYX4iTBDAlD#%^i$3Z@ bBHԫD=J[:c14S)|%> D"~S+W(DkN&K^ktuuS޾ϝuuu?Y [ZkN4hs/n_rz)޾a)x<DCCCtI <b1_p7𸣓 I/"ǐ{,Kb+g$wx + cO&"sϗ' Q W@)a+< A-ݏ5Ҥm XP!103r-4qRvACD9r_SS35$Ta1T%)\٥[5랞9skoo6 оOPk(0 P'>|ukV6˟$i)leaX.B`.-}(\e.wИIS9Rg_KfWb'c `UۢS,B@ww<}v9?~@LjIENDB`qsampler-0.2.2/icons/formRefresh.png0000644000175000017500000000112710215134643017322 0ustar alessioalessioPNG  IHDRaIDATxڭ]HSm(ZB7Ѣ~"N!AJ Ih٢Ңd˥qqc3s8μxޏﵰ*"MՃ jh1g%ڼ jxiG o4>ʴ 4X;'xK( ÀzmO$иjfH Qg+a&_H`a i jsBZ@A H ΐ^GhJ@aGr"~ͣs[fPXփYUHB~b&@T=T Rxȥ#8|ǩ M@[2UW$XU{k~*j+`i7ꃨ18rS g!.Cr_5~ \6;wѹ0ͤ> pS S^wPUŬb v&Dc9݁"b+ d|= U,d4;s-oJfIENDB`qsampler-0.2.2/icons/qsamplerInstrument.png0000644000175000017500000000047010534613413020756 0ustar alessioalessioPNG  IHDRĴl;bKGD pHYs  tIME "TIDAT8Q C9VZoT a]rIco(2r)nfw= 5u 86 XJ)6x@IBUSQZ$}}4ICKmGp?Y I;X1g_WP  3k#j7Pq˳'XjeG t4?ڭdIENDB`qsampler-0.2.2/icons/itemNew.png0000644000175000017500000000100310550473436016451 0ustar alessioalessioPNG  IHDRabKGD pHYs  tIME #!leIDATxڕOkA,{ZD؅,$D:G/U^H`5kY?Ib2I9{t]ΞkQ0nă,s0EM!7A(9u_fs_4_%P{bN|. +UJIŸ ?¯%#E蜇|k(j̿a 10E?IENDB`qsampler-0.2.2/icons/fileSave.png0000644000175000017500000000027410047651640016604 0ustar alessioalessioPNG  IHDRĴl;IDATxA EЁ@Sٶ,n}8Ӹ< )$\jB HVef!@R˧'e|X<3Z ui*n1ĸ${]Q"]*Ns.IENDB`qsampler-0.2.2/icons/fileRestart.png0000644000175000017500000000111710056573205017327 0ustar alessioalessioPNG  IHDRĴl;IDATxOhqw~63(9spX98I)rpܔ?)vp1L(R!3ofc~~v~C^zFAI;~Q # |iC9z[]̬;fv9Z.i ? J:zu5;Y`C8`m{ƛ́J"D̮9ԼU~0[_(xtz`v,ϋGD<[D9ֳـ/Wf쯬GB&d< sIENDB`qsampler-0.2.2/icons/deviceCreate.png0000644000175000017500000000045410215267255017433 0ustar alessioalessioPNG  IHDRaIDATxڵq0?e#z&̓N$A ]~ e?zcm5$1@Zkrwd"w$)^LXLzOݗX559SDLi/.mǬ o6̛ T͈*lc =sAǞ tgl X3PV?d\]~0*zfg1_1%) EoS)KCTCIENDB`qsampler-0.2.2/icons/formAccept.png0000644000175000017500000000026310051226513017117 0ustar alessioalessioPNG  IHDRazIDATx cHۆ}Xt>Ԅ݅jT. ɼ5ac՝fJw3焵I `)J!-8~B't¯;mJ#2FG$;EJxguIENDB`qsampler-0.2.2/icons/qsampler.png0000644000175000017500000000435110250027275016667 0ustar alessioalessioPNG  IHDR szzIDATXåo?{.>>vlq! J6ڂTQ+*RKJPZQBB$jnss=g/3}M0i@f|͌KVزwBn=ȥ 2=P< ߀(nbN6= C`_LN<Gr-6lX= 12O\&.ϗyK9rV+Jopps_ m /w=fd i4B\7HIT^8F-rwe < \H(Ѱeh{{8p!~> ՚OS tsmmBN\(F#pc\ Rw(a=翈~/⋏rV%)Ԙ0W xME$m.LïdD&`.;w>S䥗%,BKf&h[O4$>n>zg 4p 60 onEs0<܋,0ً5ד@5k܆-TZOgYwN&B h>ZJAt[d g%ӆ79Ddg"1&=SuՆRU-DLCSs!SVdAX91A 8nyr}`!c(u-Y>2J7ԛɠ; {336JŌ}lPG`t"\:|;7pxJ|wNl;C__'=>7d, cI-ɖrV\l6$vhhA-K!N3DP_Z$tia~Dp %ν:V'+)1y9:8-P4ݘVK ,8vk'j)&jOs5EjҝX6 pE e*n`9=}pKCޑdl ۶R E`ىIպ"-l!?倆>^{l@`!ؔbA؊!6@A,s:n6Жw,d3gL3;#[FdzAOOǻSy^^u%,ciGhz!aPJNg8 j`Š-"IǵS!Z Kfl22J ./<;:X%b|0w]MXX6: dy&-?"\ &.02!POZ52n[ttG^2ꯚ`$nHZyܲ eٺ^V' (!2pbS5ޞWXmwv{K?}{lI⢣tJzB` \̚;k9:̢DE(# Ey.*'\b;:s[dxq+H_~#DvJ4fkl޾Uݜ6bC F !ɫ`l(bc_;7be6V1jR*C>S 1P^T.R,JedJ-0vd&QUAO0Ueh\SE110r~!L ?#gpٵwpB=EVS&C)1, H\]}Yk!*PQLFn1ΐħR;*r6:Nz΁x`:`ƶh*DXFXc7(Y}F-ټƛ̝82.Nwk QffJr{R3uR^j؆~ B"Y1V:~)8.\w#Y)zR?-!zΓJEM[N*"}ūTiTUZQzҋzw]_tߞZ' Tk ҀZ&ཿwRZ/͝@xCn h@PЅKơafɊe!U{nSiwA4y|-h/b"f! Ab D6T\4 hxp%܃ϣqnJ l 8# O'ǩr{cڋocLZ BäWh~wUGf5_f\ ,@:.}˦IENDB`qsampler-0.2.2/icons/fileReset.png0000644000175000017500000000105210126307440016755 0ustar alessioalessioPNG  IHDRĴl;IDATxka985f+95.Wt]kPn$ƍb~--QԴFæ&2Ȥf9|s 9;\{_=||%$ bN,^^c,?h rS,׆iΈHcBe$2XDxv}J!%P+]&"tҏ/ 41.a kK&a#HDBLhImeI27&M+RIOɞ%ȯ{$d3wne%C|X&4)K%9*oQ<:UYI8}:b,}qħ;V̟m;Ʃ x^h'D%{=b&.b[Ejs:a ϐU*}!+0qJhIAa'[~̽1Ba=q'X7ӭy 2l]EF1@$؏ŷ~l-dbR_"FpW0kX&c@IENDB`qsampler-0.2.2/icons/editRemoveChannel.png0000644000175000017500000000047510051226513020435 0ustar alessioalessioPNG  IHDRĴl;IDATxm0 FL!ddBg19=P FO,IQSr7gfe%`Q *("HI)C0@ΙT` x1B1F\PPkn/{9c妠7`aX+59t}Bۖ ]J B૶9T=ה~ 1)m{IQsoNsvEHYlz=CF֥^icNU3zAݏIENDB`qsampler-0.2.2/icons/formEdit.png0000644000175000017500000000044110550473436016617 0ustar alessioalessioPNG  IHDRabKGDD(M pHYs  ~tIME  - .LIDATx 0 'Jq!|2\兄dzZYH7 YojED% &eUsuP}3OPu0L>L>L%xb'$8%eof^Dd $åߵpVpA g`w`}_Cu.U95IENDB`qsampler-0.2.2/icons/qsampler.qrc0000644000175000017500000000242510712347047016675 0ustar alessioalessio audio1.png audio2.png channelsArrange.png deviceCreate.png deviceDelete.png displaybg1.png editAddChannel.png editEditChannel.png editRemoveChannel.png editResetAllChannels.png editResetChannel.png editSetupChannel.png fileNew.png fileOpen.png fileReset.png fileRestart.png fileSave.png formAccept.png formEdit.png formRefresh.png formReject.png formRemove.png itemFile.png itemGroup.png itemGroupNew.png itemGroupOpen.png itemNew.png midi1.png midi2.png qsampler.png qsamplerChannel.png qsamplerDevice.png qsamplerInstrument.png qsampler-0.2.2/icons/fileOpen.png0000644000175000017500000000041510047670601016602 0ustar alessioalessioPNG  IHDRĴl;IDATxT 3 ]GGXd9A yG1+Nt5})Ι,/b78ceiW9CU*bܐR2U]T! j%vc/CPP^-"  VjZ-?!sQ8+a`}h^ZNEj<xVHc39IENDB`qsampler-0.2.2/icons/editResetChannel.png0000644000175000017500000000040410207104603020250 0ustar alessioalessioPNG  IHDRĴl;IDATxQ DG&^o=\d9B5ڟvv@3bE΁J@σKfz<Ǒi:8p#NFc IU-t1Ƣ0(s)UE"e˽\DR1D!Pkmk9BINX(I C +^׊1yom}|c5{z/ü_l\[ IENDB`qsampler-0.2.2/icons/midi2.png0000644000175000017500000000035710215134603016044 0ustar alessioalessioPNG  IHDRaIDAT8œ 0 D_9333G,WU[(H+>;9/c:%=Z. $$3y{fv 7;f$"INf "0"bHuQ2S֐tzm13i|ܷIWGSx*(kXw_ӗ_<, EIENDB`qsampler-0.2.2/icons/editResetAllChannels.png0000644000175000017500000000051710207104734021076 0ustar alessioalessioPNG  IHDRĴl;IDATxݕ E?S&1gdap4&&6mB?Cu^/mNp]Wsx>c#" =Woy P; y~/ضPMNE{0As̪(lBtYʸts٤t96g~%OSHzZ<{[xk(!1hٞD# ~xJ)R03~YI99}ײWs3zN{lż:IENDB`qsampler-0.2.2/icons/itemGroup.png0000644000175000017500000000146410534613413017020 0ustar alessioalessioPNG  IHDRaIDAT8}OheoovwIktniSi-ـ($T*5"JEkQ7EbkjZ1mdĤugwdwfgKM-n//Ϗn9ES{ϖ{{{nݮ*x)R8}0u}g.ۖgt]޾{=?/qgvWgG2/\-ֵgrr hl~S<ݹSg .2qz4[oxl3E0ahΏ{=} Xm]D<*&B ѩ,8?ԏ+ӏwi»VI74M U W2soώ_ x8WjP @JR B!pؘ3] Lr)( @4)+* 0v}H)BHuZF-("l!i"ulM0 oMׂ}xAjf.EM60|󟙉b>tށ6@2m;[Br B  NSјYV Ew qA'P̧ZLA`C%pQ,GLCQZ;/K[hLAuLjW]$$QӴKVR1 1XIENDB`qsampler-0.2.2/icons/channelsArrange.png0000644000175000017500000000035410055600474020136 0ustar alessioalessioPNG  IHDRĴl;IDATx D/U7*} 6n;z~P(^)Tf~ >[p |zCk=kH@^ ?t_?o?Oşg\^?y8c&)Hj$#O@ J&{%2oW2L~+=(Z7>#q}Ɨ{'c9 Ѝ!y o q΃z˃+j`P(>buKH<yfx:;_}3}"^_&Nn8pApAA>s0H F,`lSR֢ȸ/Ĕ }C҂pxm]l+iƃ "C1ȞVd}Tb?|BzY(ނ{f5khT[!ԁ`]?k=ELO>:J8b"%Fb2 \Lͮ5:\+ `,o)l4n:$yY!ƈi"ia "wq. cבK1Mt>{c&Dc"P1MYI?wK`NW=JRɚ=Kh,'{ W9n`y{+gi(e2S;`OOi{e?K<ж? DS62c蘀pžՙaHM>\?5rzyifb9`$sKy~̦ȔÀPIT"O˰g&ePIC=ƮdD:1dGZ!p3>%,u<`D˿e`\2LXH53K""!@+TLbC`סv%@_HWʸ`'x,K=숞[,;C d_Z 7 eM P(CLW\ovɕV%BgC#2;K OۮJq4#V'0܁1._ɔ&!*"a>urAMY$7,P9: bp|PuQ=[aa-hu6]]4ۻ8}5~%IJGp8w}YmH) 6H9uFdƒ]Kr#MpDݍ[Xic@ %W'JVR$}1xoqA:2@'&W .M'c9n*F5u%ISb4S Hf(.vtzRp8,}nD%“xo<Ϙir[F - h>@H/MDQ$@m(ۺ[bPjݫe!by2ͧl B:EzXwdqBJ1!zU,Aezٰy<}!9fsp?#p^n 8'`foj_i7aa Oe5~)Jbc6gJrl664Cua~{;Yfҫ;;ʫhM=7]̣[T/mi‡'*w ; ŴYL^ȞpT ]>Ǵs&g|,ieVHlj3͊10\<ٸ Cf_ lbzd:{0P+uݬIK׈y_W|u{HMZ=3FQ"@_zI Huktd55MeuPr`F\[pUx_2t`34XVck@ocS!:8a L\."_^t 8Dw}[qrҨX`~e*!&)V.ZYYVmJ-&hg՘s iQ+IA)-Y*K(5Gη県2֬]b-!j# `ju1se' yA)0>DHL7!P5zBd>-)c{rvbEw3sj|ZS\B~OHM>=&pCt[==OOq`C?@hF $V L t, &Wqժ7+\.3X0,>,q6n+1'h:QH_C`z?ח/o^8/zsEasLACRH>{eٌQ,k!uy!YB8i1#YQ͛8X,xLn2ƝP?Q;^P/= Zuu?c 21/ Ox~麄 YS%.QP*fD!n,S APYpfQ/h͙+n1&k3àÐNG`#} 5vͻ"i5/Os;f~è2r|{$>oW0θ\gp7GI=;DX,+XEBTj5+,EbadK ]aW`P]5swlji4m7IJ T̽PJ $8_ x{y˴$>y3ABtgVX~b, mpiK2@LUdyjQBijW ifg5m.v3)*X w9ֻ@ҟE+屰Yxh6-g YےItP/GIJW8@̓cϗ;]FS3@4ay^2IaH7P) 7ۑDgW%gUJ=:̵Fd7xVBSlz Xii{cOR舑) hv x>HK:,S3Ds8py59Wq0]'Dkca7]5T0,|_*YK2̆g@{Bb|;d.D%}Hx,Gz =+܋ްҺ`Ԡr0cy4;utE`ث% =/%1qZ +7(fL=25 LY>.P2@ .,=:;,z 0 p-| 4Jm{FNaxf`u&Huf\tְ}l |U1Uח[ YR XN4d(Pn.1: qfZX2;Q0V:68E[Zbby_ʎ\F_ivxa9+$wmI]"Q5V-Mx˅UF9O8ҕ!#wJs˳zݮ海7rt* 8aR48U~!FMENt@%6P3AdH-G\"3O W,T5Lnh,[D6 RZB+J9Vt>9nʢ}v/e8>&y Ig [ Kb\^(~OQ\K+ف0=%J T[i9(~~V&l9L "~ꅮi C:bXk;2x(DzH I;яG~TQGgճkHfPEВJ6dfQ4g{iϥzr)M:e7TyGeP7'ܽc7{w2e{Ƕ&AVy;]냴ՔxeoMQSԡi[Z&:t.sUu='7a588 EckW8^6B#ًAҾ,p #V5doܒT#EYg"bh /2gZiA0[ wv*Vt`Cs/z!]FGzvW~Y`s\*p^n4cD=(L !aBԺd6 ) 5v1STYefZ2)4:MjA!Ye[ߞ?י8<;`@88q/2qe}P S$/M"Ok~R2Kˬ) 5/1px3; M6вF'deѕǸȗAª/~0XJREY޶ $vVz9!\W,Qs珒KXJl5PA,U[!(zVy;wk3c;&Fa+&f-"!!i|^Gaoϼzb&2 Y[Xp✑Pj Dq@CtZna! >CO>@; oϧtk\"Mh=OXV{aaIuB.0cV]^p`uXJ^9ٍoT-XkW" j `[ )Bxw^X,Đ#h{ u^b0aѬyk[٣2VhT\Ŋ닝UF.za]1cy'hǗJٗؾ_!Ά屆 -1j"[?i"g+JgZV (PB-M]f,iLuf;#]ןMA zƖQ`gSd';uZ&%ߛf +.EvH Xxy461`'4H-m.לe|4t`m2-e6cOP-h>#Iƙ!1Qe}j+:ٷ5wR2u-JQ+cż#jgiyr954+Pa+3 z l Yΰj9SYkY &ДڭZC,io݄@IGl XPY9wC$6T\ai <;uLTAx@v*DˁJzk+k}/C`waTkzUǧ)[n0*c+"I)23MLE]%ˁ,1 m_tYbb8*{ciG[KfF%X6edo4As`v:wfp\V[Ga9d|F$t=`jy1wyQ'[ jeMfaJzP"e-IM`GwzZZEt}OY~G#~4 =j&Ycn2>bQߧC]Z (\bX>b"P?e-3jsx=X؜'Q -f~fw^G}vEf|v͑d\{lI9Tmy:e(81j$JZYDcD+k=֭&tjN횾N~FVX _9+$ah[BkHS"+]J[ŮR>ǖ)A[/&YI#lI<$3Ώ4Q@&-˓J iKr=P{l !{y[K̝pViSUI52@(r/ϣs2 f5!0 InrfjAgbJQr]CaQP,𳆢udяDc U dY xZa>/76*$փIcf>s;&ce_ۏa^n dhZbMAUqH2RBV[ڬ6.B{IENDB`qsampler-0.2.2/icons/deviceDelete.png0000644000175000017500000000045410215267255017432 0ustar alessioalessioPNG  IHDRaIDATxڵm0EOlӼ3яqRP̽q𰗟6,qߛR @Ji7̅dT\U=}MÏAU]DNBrμ'dDXTUS'0D`@  'i~ͱ9pH֭r)*"}90 M$ D`{`kmjU.cȒ;yIkKZ"ҙ0so;^ ?C9%߄-eIENDB`qsampler-0.2.2/icons/editSetupChannel.png0000644000175000017500000000037310051226513020275 0ustar alessioalessioPNG  IHDRĴl;IDATx EXFa,=Iq)KH`6i9nTe< "^ZۢDcedd9ފ5ptҡzu"oT8qYBN:Z%Ykv+[{,eJQ\gK;KU/#M gOIENDB`qsampler-0.2.2/icons/editEditChannel.png0000644000175000017500000000062110700677176020076 0ustar alessioalessioPNG  IHDRĴl;bKGD pHYs  tIME  5UIDAT81j0 8wc\ǃ?7Ьk& k`rf_!4uhlN >Hӓls眺 XDh7qm G"BZKZK $)Dzj-HbZk|(OA ={Ӷm:cWBE۽"pNAP qibV!iE?a79(g$IENDB`qsampler-0.2.2/icons/fileNew.png0000644000175000017500000000027610047652007016437 0ustar alessioalessioPNG  IHDRĴl;IDATx @_PG8)@x`l"W$mvjjoZ+bPUj g%@DRIJs?R徰)o6j0= 4.4 applications regarding font size configuration, a new global user option is now available to the rescue: View/Options... /Display/Other/Base font size (default none). * Attempt to load Qt's own translation support and get rid of the ever warning startup message, unless built in debug mode. (transaction by Guido Scholz, while on qsynth-devel, thanks). * Only one application instance is now allowed to be up and running, with immediate but graceful termination upon startup iif an already running instance is detected, which will see its main widget shown up automatically (Qt/X11 platform only). * Messages file logging makes its first long overdue appearance, with user configurable settings in View/Options.../Server/Logging. * Bugfix in sampler channel dialog, driver combo boxes' content were screwed. * Automatically add & remove channel strips as they were removed e.g. by other frontends. * Refresh device management dialog when device informations changed, e.g. on changes caused by other frontends (fixes segfault on device changes) * Implemented MIDI device activity windows, selectable from the "View" main menu. * Implemented MIDI activity indicator on channel strips. * Added FX Sends Dialog to Channel Strips. * Color pallete fix for the instrument name display in channel strip, particularly notorious on Mac OS X builds. * Added dialog when the application exits which lets the user decide whether to keep the LinuxSampler running or not. 0.2.1 2007-12-06 Qt4 migration was complete. * Added recent new support of libgig for retrieving instrument names in avery fast way. If libgig provides this feature, then the respective name retrieval setting in qsampler is enabled by default. * The current selected/activated channel-strip is now visually evident while in the application workspace (highlighting). * Make View/Menubar and Toolbar shortcuts accessible even though the main menu and toobar are not visible. * Audio routing table is initially hidden in the dialog, when creating a new sampler channel. * README requirements and configuration notes update. * Disable OK button in sampler channel form and MIDI instrument form if no valid engine is selected (to avoid bothering newbie users with confusing LSCP syntax errors when using the UI the first time). * Fixed creation of devices (don't try to set device parameters which the user did not touch in the device creation dialog). * Added Windows file path support. * Fixed win32/qmakefile and win32/config.h so that it compiles under win32. * Qt4 port of the application. 0.1.5 2007-10-15 Five months later a fifth is heard. * Added support for LSCP escape sequences to allow loading and mapping instrument files with special characters in their filename, as well as special characters for instrument names and instrument map names (requires LSCP v1.2 on sampler side). * Added new button "Edit" to the channel strips, which probably does exactly what you think it does: it opens an appropriate instrument editor application; the channel instrument editor tool is also accessible from the main menu and toolbar. * Application icon is now installed to ${prefix}/share/pixmaps; application desktop entry file is now included in installation; spec file (RPM) is now a bit more openSUSE compliant. * Crash fix on double-clicking on a empty instrument list. 0.1.4 2007-05-04 Almost another year has gone by. * Channel button colors have changed: yellow for mute and cyan for solo is now the rule, but note that this color highlighting is only rendered on some widget styles. * Master sampler volume slider/spinbox combo is now featured. * Initial support for sampler channel FX sends, while saving the session state, only at code-level. * Sampler channel setup dialog does not mandate for valid nor existing instrument file name. * Revised error verbosity in general and on session load/save; hour-glass wait cursor is now displayed on session load/save; keyboard shortcuts changed on MIDI instruments view context; improved channel strip arrangement on session open/load; instrument map entry removal confirmation (as optional); corrected some tooltip text strings. * Most top-level widgets were missing the normal-widget flag, which were causing some sticky size behavior while on some window managers. * Added preliminary MIDI instrument mapping support; now with an instrument list widget and editing capabilities; MIDI instrumeent map program numbers are now displayed in the range 1-128, instead of the internal 0-127. * GPL address update. 0.1.3 2006-06-01 Its been a long year isn't it? * Changed deprecated copyright attribute to license, on qsampler.spec (RPM). * Added configure support for x86_64 libraries (UNTESTED). * Optional specification of alternate liblscp and libgig installation paths have been added to configure command arguments (--with-liblscp, --with-libgig). * Whenever the listing of actual instrument names is not an option (e.g. due to lack of libgig support), the whole number of selectable instrument items is now being graciously increased from just the bare 8 (eight) right up through 100 (one hundred), on the sampler channel setup dialog. * The selection buttons, on the right of the Instrument, Audio and MIDI devices combo-boxes, on the sampler channel dialog, are now expected to be a little better looking than it was before, at least for those Mac OS X eyes. * Minor fixing on the initial messages dock-window height. * Audio output channel routing configuration finally hits the sampler channel dialog, at last! (EXPERIMENTAL). * All widget captions changed to include proper application title name prefix. * Attempt to bring those aging autoconf templates to date; sample SPEC file for RPM build is now being included and generated at configure time. * Set to use QApplication::setMainWidget() instead of registering the traditional lastWindowClosed() signal to quit() slot, just to let the -geometry command line argument have some effect on X11. * Added MUTE/SOLO buttons to individual channel strips. * Fixed compilation error which occured when Qt was compiled with -no-stl. 0.1.2 2005-06-23 Even minor workings needs a rest. * Fixed output disability when messages limit option is turned off (thanks to Wolfgang Woehl for spotting this one, while on qjackctl). * Added CHANNEL_INFO event feedback notification handling; minor stream/voice usage auto-refresh cycle optimization. 0.1.1 2005-06-12 The mantra of bugfixes. * New improved and full-featured application icon, thanks to Christian Schoenebeck design. * Fixed refresh cycle of channel strips that are found in an error state, which was preventing correct channel info updates. * Device configuration now accessible on toolbar. Added buddy text label to device port/channel combobox on the device dialog. * Include libgig version info on command line request (-v). * Minor configure and Makefile install fixes, as Debian and Mac OS X specialties. Also, install does the right thing with target file modes (thanks to Matt Flax and Ebrahim Mayat, for pointing these out). 0.1.0 2005-05-23 Device configuration breakthrough. * Device configuration is now complete (EXPERIMENTAL). * [bug #9] Fixed for a LSCP command syntax convention consistency, regarding the enumeration of available sampler engines, Audio and MIDI drivers. * [bug #13] Update instrument names list when a new instrument file is select on the channel setup dialog. * Show appropriate message in channel strip while loading an instrument. * Show libgig version in About box (in case libgig is used). 0.0.5 2005-03-04 Fifth alpha-release. * Fixed device driver type channel information gathering, which was severely flawed, dropping all channel session configurations to the default audio driver type (which is ALSA) unexpectedly. * Channels are now properly renumbered when saving to a session LSCP script, assuming that it should be always loaded from scratch (i.e. zero channels). * Disabled MIDI port setting on channel dialog, and on session file save, as its use is still troublesome. * Added new menu and toolbar option: Reset All Channels. * Channel setup changes are now properly filtered, as for only those settings that are actually changed gets applied; change information are now also posted to messages window. * Drag-and-drop of either session files (LSCP scripts) or instrument files (GIG) are now supported. Multiple files drop is allowed, but it only makes sense for instrument files, each one prompting to create a new sampler channel. * Drag-and-drop to an existing channel strip is now also featured, allowing the in-place change of the channel sampler instrument file. * Actual instrument names are now optionally retrieved from the instrument file, even though libgig is available, avoiding excessively annoying load times while on the channel dialog, when huge instrument files are selected. * Set to ignore the SIGPIPE ("Broken pipe") signal, where available, as the default handler is usually fatal when a JACK client is zombified abruptly. * Messages window limit is now enforced only when the line count exceeds in one third the user configured line count maximum; if Qt 3.2.0+ is in use, the QTextView widget is otherwise set to the optimized Qt::LogText format. 0.0.4 2004-11-19 Fourth alpha-release. * Instrument index selection now made via combo box widget; actual instrument names are now properly retrieved from the instrument file, provided if libgig is available. * Sampler channels strips are just created if, and only if, the respective channel setup dialog is actually accepted, following common user-interface guidelines. * Almost complete rewrite of sampler channel strips internal control structures. * Sampler reset command action added to menu and toolbar. * MIDI channel selection is now a dropdown list, allowing the explicit selection for "All" channels input per sampler channel (omni mode). * Channel strip display glass effect has changed background color to black (was green), being now an user option. * Minor configure fixes. 0.0.3 2004-07-06 Third alpha-release. * Mon-modal intrument file loading and status support. * Effective MIDI input port setting on channel dialog, and on session file save. * Channel dialog gets sensible engine and driver defaults on create time. * Implied channel reset on successful instrument load. 0.0.2 2004-06-15 Pre-revolutionary release. * The channel context menu is also accessible by right-clicking over the empty workspace area. * Added small wait event loop on qsamplerMainForm::stopServer(), so let local server terminate gracefully and stabilize, and avoiding a probable segfault on exit, which was preventing the correct salvage of settings and configuration. * Maximum channel volume percent setting is now a global option, provided to override the default (which is 100%). * Client/server transaction timeout option upper limit has been increased from 5000 to 60000 milliseconds. * A channel context menu is now featured, by right-clicking over each sampler channel strip. * Commented SET CHANNEL MIDI_INPUT_PORT command from qsamplerMainForm::saveSessionFile(), it has no effect. * Insert a n #include on qsamplerMessages.cpp, between a #if !defined(WIN32) clause. * An initial non zero value (0.8) is now set for volume of every new sampler channel strip. * The order to load/save and setup channel settings is now as suggested in the following lines: SET CHANNEL AUDIO_OUTPUT_TYPE ... SET CHANNEL MIDI_INPUT_TYPE ... SET CHANNEL MIDI_INPUT_CHANNEL ... LOAD ENGINE ... LOAD INSTRUMENT ... SET CHANNEL VOLUME ... 0.0.1 2004-06-05 Primordial alpha release. qsampler-0.2.2/TRANSLATORS0000644000175000017500000000010411162445664014762 0ustar alessioalessioRussian (ru) Alexandre Prokoudine qsampler-0.2.2/config.h.in0000644000175000017500000000615411236104773015254 0ustar alessioalessio/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if audio_routing is an integer array. */ #undef CONFIG_AUDIO_ROUTING /* Define if debugging is enabled. */ #undef CONFIG_DEBUG /* Define if instrument editing is available. */ #undef CONFIG_EDIT_INSTRUMENT /* Define if LSCP CHANNEL_MIDI event support is available. */ #undef CONFIG_EVENT_CHANNEL_MIDI /* Define if LSCP DEVICE_MIDI event support is available. */ #undef CONFIG_EVENT_DEVICE_MIDI /* Define if FX sends is available. */ #undef CONFIG_FXSEND /* Define if FX send level is available. */ #undef CONFIG_FXSEND_LEVEL /* Define if FX send rename is available. */ #undef CONFIG_FXSEND_RENAME /* Define if instrument_name is available. */ #undef CONFIG_INSTRUMENT_NAME /* Define if libgig is available. */ #undef CONFIG_LIBGIG /* Define if max. voices / streams is available. */ #undef CONFIG_MAX_VOICES /* Define if MIDI instrument mapping is available. */ #undef CONFIG_MIDI_INSTRUMENT /* Define if mute/solo is available. */ #undef CONFIG_MUTE_SOLO /* Default installation prefix. */ #undef CONFIG_PREFIX /* Define if round is available. */ #undef CONFIG_ROUND /* Define if global volume is available. */ #undef CONFIG_VOLUME /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if libgig provides gig::File::SetAutoLoad() method. */ #undef HAVE_LIBGIG_SETAUTOLOAD /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the `Xext' library (-lXext). */ #undef HAVE_LIBXEXT /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `system' function. */ #undef HAVE_SYSTEM /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS qsampler-0.2.2/osx/0000755000175000017500000000000011236104755014034 5ustar alessioalessioqsampler-0.2.2/osx/README.osx0000644000175000017500000001015510742437720015530 0ustar alessioalessioCompiling QSampler for Mac OS X with XCode ============================================== Requirements ------------ QSampler requires Qt4. You need to install Qt4/Mac from the source codes. Go to Trolltech website (http://trolltech.com/products/qt) and find the necessary information. If you want to build a "standalone" application that does not require Qt at runtime (i.e. containing the necessary Qt frameworks in the package), you need to install the binary distribution of Qt4/Mac as well. QSampler is also dependent on liblscp, so build liblscp before building QSampler. Please read "README.osx" in the liblscp source distribution. The XCode project uses autotools build files. On Mac OS 10.4, you need to install pkg-config (available at http://pkgconfig.freedesktop.org/wiki/). Layout of the Directories ------------------------- The XCode project for qsampler creates a temporary build directory as "$QS/../temp_build/$BUILD_STYLE" (where $QS is the qsampler directory, and $BUILD_STYLE is the build style defined in the XCode project). In this directory, the following subdirectories are created and used: $BASE.build: Intermediate build directory. Symbolic links to the original source files are placed and "configure && make" is performed in this directory. ($BASE is the basename of the qsampler directory.) local: The qsampler application package is created in this directory as local/bin/qsampler.app. This layout of the directories is similar to that of the liblscp project, on which qsampler is dependent. You need to compile liblscp first (with the same settings as this qsampler XCode project). So it is best to create a common directory, place the liblscp and qsampler directories in it, and build liblscp and qsampler in this order. See also "osx/README.mac" in liblscp. You may have built linuxsampler as well. If you have done so, you should have created a common directory for libgig and linuxsampler. It is a good idea to place the liblscp and qsampler directories in this same place. Universal Binaries ------------------ You can create the Universal Binaries by selecting "Deployment_UB" build style and build. The binaries for i386 and ppc architectures are built separately and then automatically combined. The Universal version of qsampler is found in $QS/../temp_build/Deployment_UB/local/bin. You do not need to have the Universal version of liblscp, but you _do_ need to build liblscp both for i386 and ppc architectures. The Universal version of qsampler.app is intended for binary distribution, so it has some additional features as follows: (1) On startup, QSampler modifies the PATH environment variable so that the directory in which qsampler.app resides is included in the search path. This feature allows the user to place the linuxsampler binary in the same directory as qsampler.app, making the installation/uninstallation simple. In addition, the default setting invokes the "linuxsampler.starter" script instead of the linuxsampler binary itself. This script creates the instrument database if not present, start up the Jack deamon, and invokes the linuxsampler binary. This script will be copied to $QS/../temp_build/Deployment_UB/local/bin when building the "Deployment_UB" target. (2) If you have the binary package of Qt4/Mac installed, the runtime Qt frameworks are copied in Contents/Frameworks. This should enable qsampler.app to run on machines without Qt installed. On the other hand, the size of qsampler.app is bloated to about 30MB (without the frameworks it is something like 2MB). (3) The application icon is placed in Contents/Resources. Additional Information ---------------------- The XCode project just invokes autoconf_builder.sh with after setting relevant environmental variables. If you are interested (or feel suspicious), please examine autoconf_builder.sh. 6 May 2007: First written (for libgig) by Toshi Nagata 9 May 2007: Updated to account for the Deployment_UB target 30 Dec 2007: Updated for QSampler 13 Jan 2008: Small modification qsampler-0.2.2/osx/qsampler.xcodeproj/0000755000175000017500000000000011236104755017654 5ustar alessioalessioqsampler-0.2.2/osx/qsampler.xcodeproj/project.pbxproj0000644000175000017500000003547510742437720022750 0ustar alessioalessio// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 42; objects = { /* Begin PBXFileReference section */ E4019E270BED928D0094EB0E /* autoconf_builder.sh */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text.script.sh; path = autoconf_builder.sh; sourceTree = ""; }; E4019E280BED928D0094EB0E /* wrapper.sh */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text.script.sh; path = wrapper.sh; sourceTree = ""; }; E43B2BDC0D22A64F009BAC44 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; E43B2BDD0D22A64F009BAC44 /* qsamplerAbout.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerAbout.h; sourceTree = ""; }; E43B2BDE0D22A64F009BAC44 /* qsamplerChannel.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerChannel.cpp; sourceTree = ""; }; E43B2BDF0D22A64F009BAC44 /* qsamplerChannel.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerChannel.h; sourceTree = ""; }; E43B2BE00D22A64F009BAC44 /* qsamplerChannelForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerChannelForm.cpp; sourceTree = ""; }; E43B2BE10D22A64F009BAC44 /* qsamplerChannelForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerChannelForm.h; sourceTree = ""; }; E43B2BE20D22A650009BAC44 /* qsamplerChannelForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerChannelForm.ui; sourceTree = ""; }; E43B2BE30D22A650009BAC44 /* qsamplerChannelStrip.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerChannelStrip.cpp; sourceTree = ""; }; E43B2BE40D22A650009BAC44 /* qsamplerChannelStrip.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerChannelStrip.h; sourceTree = ""; }; E43B2BE50D22A650009BAC44 /* qsamplerChannelStrip.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerChannelStrip.ui; sourceTree = ""; }; E43B2BE60D22A650009BAC44 /* qsamplerDevice.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerDevice.cpp; sourceTree = ""; }; E43B2BE70D22A650009BAC44 /* qsamplerDevice.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerDevice.h; sourceTree = ""; }; E43B2BE80D22A650009BAC44 /* qsamplerDeviceForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerDeviceForm.cpp; sourceTree = ""; }; E43B2BE90D22A650009BAC44 /* qsamplerDeviceForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerDeviceForm.h; sourceTree = ""; }; E43B2BEA0D22A650009BAC44 /* qsamplerDeviceForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerDeviceForm.ui; sourceTree = ""; }; E43B2BEB0D22A650009BAC44 /* qsamplerInstrument.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerInstrument.cpp; sourceTree = ""; }; E43B2BEC0D22A650009BAC44 /* qsamplerInstrument.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerInstrument.h; sourceTree = ""; }; E43B2BED0D22A650009BAC44 /* qsamplerInstrumentForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerInstrumentForm.cpp; sourceTree = ""; }; E43B2BEE0D22A650009BAC44 /* qsamplerInstrumentForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerInstrumentForm.h; sourceTree = ""; }; E43B2BEF0D22A650009BAC44 /* qsamplerInstrumentForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerInstrumentForm.ui; sourceTree = ""; }; E43B2BF00D22A650009BAC44 /* qsamplerInstrumentList.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerInstrumentList.cpp; sourceTree = ""; }; E43B2BF10D22A650009BAC44 /* qsamplerInstrumentList.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerInstrumentList.h; sourceTree = ""; }; E43B2BF20D22A650009BAC44 /* qsamplerInstrumentListForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerInstrumentListForm.cpp; sourceTree = ""; }; E43B2BF30D22A650009BAC44 /* qsamplerInstrumentListForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerInstrumentListForm.h; sourceTree = ""; }; E43B2BF40D22A650009BAC44 /* qsamplerInstrumentListForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerInstrumentListForm.ui; sourceTree = ""; }; E43B2BF50D22A650009BAC44 /* qsamplerMainForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerMainForm.cpp; sourceTree = ""; }; E43B2BF60D22A650009BAC44 /* qsamplerMainForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerMainForm.h; sourceTree = ""; }; E43B2BF70D22A650009BAC44 /* qsamplerMainForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerMainForm.ui; sourceTree = ""; }; E43B2BF80D22A650009BAC44 /* qsamplerMessages.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerMessages.cpp; sourceTree = ""; }; E43B2BF90D22A650009BAC44 /* qsamplerMessages.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerMessages.h; sourceTree = ""; }; E43B2BFA0D22A650009BAC44 /* qsamplerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerOptions.cpp; sourceTree = ""; }; E43B2BFB0D22A650009BAC44 /* qsamplerOptions.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerOptions.h; sourceTree = ""; }; E43B2BFC0D22A650009BAC44 /* qsamplerOptionsForm.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerOptionsForm.cpp; sourceTree = ""; }; E43B2BFD0D22A650009BAC44 /* qsamplerOptionsForm.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerOptionsForm.h; sourceTree = ""; }; E43B2BFE0D22A650009BAC44 /* qsamplerOptionsForm.ui */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = text; path = qsamplerOptionsForm.ui; sourceTree = ""; }; E43B2BFF0D22A650009BAC44 /* qsamplerUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.cpp.cpp; path = qsamplerUtilities.cpp; sourceTree = ""; }; E43B2C000D22A650009BAC44 /* qsamplerUtilities.h */ = {isa = PBXFileReference; fileEncoding = "-2147483647"; lastKnownFileType = sourcecode.c.h; path = qsamplerUtilities.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* LinuxSampler */ = { isa = PBXGroup; children = ( E4019E270BED928D0094EB0E /* autoconf_builder.sh */, E4019E280BED928D0094EB0E /* wrapper.sh */, E43B2BDB0D22A64F009BAC44 /* src */, ); name = LinuxSampler; sourceTree = ""; }; E43B2BDB0D22A64F009BAC44 /* src */ = { isa = PBXGroup; children = ( E43B2BDC0D22A64F009BAC44 /* main.cpp */, E43B2BDD0D22A64F009BAC44 /* qsamplerAbout.h */, E43B2BDE0D22A64F009BAC44 /* qsamplerChannel.cpp */, E43B2BDF0D22A64F009BAC44 /* qsamplerChannel.h */, E43B2BE00D22A64F009BAC44 /* qsamplerChannelForm.cpp */, E43B2BE10D22A64F009BAC44 /* qsamplerChannelForm.h */, E43B2BE20D22A650009BAC44 /* qsamplerChannelForm.ui */, E43B2BE30D22A650009BAC44 /* qsamplerChannelStrip.cpp */, E43B2BE40D22A650009BAC44 /* qsamplerChannelStrip.h */, E43B2BE50D22A650009BAC44 /* qsamplerChannelStrip.ui */, E43B2BE60D22A650009BAC44 /* qsamplerDevice.cpp */, E43B2BE70D22A650009BAC44 /* qsamplerDevice.h */, E43B2BE80D22A650009BAC44 /* qsamplerDeviceForm.cpp */, E43B2BE90D22A650009BAC44 /* qsamplerDeviceForm.h */, E43B2BEA0D22A650009BAC44 /* qsamplerDeviceForm.ui */, E43B2BEB0D22A650009BAC44 /* qsamplerInstrument.cpp */, E43B2BEC0D22A650009BAC44 /* qsamplerInstrument.h */, E43B2BED0D22A650009BAC44 /* qsamplerInstrumentForm.cpp */, E43B2BEE0D22A650009BAC44 /* qsamplerInstrumentForm.h */, E43B2BEF0D22A650009BAC44 /* qsamplerInstrumentForm.ui */, E43B2BF00D22A650009BAC44 /* qsamplerInstrumentList.cpp */, E43B2BF10D22A650009BAC44 /* qsamplerInstrumentList.h */, E43B2BF20D22A650009BAC44 /* qsamplerInstrumentListForm.cpp */, E43B2BF30D22A650009BAC44 /* qsamplerInstrumentListForm.h */, E43B2BF40D22A650009BAC44 /* qsamplerInstrumentListForm.ui */, E43B2BF50D22A650009BAC44 /* qsamplerMainForm.cpp */, E43B2BF60D22A650009BAC44 /* qsamplerMainForm.h */, E43B2BF70D22A650009BAC44 /* qsamplerMainForm.ui */, E43B2BF80D22A650009BAC44 /* qsamplerMessages.cpp */, E43B2BF90D22A650009BAC44 /* qsamplerMessages.h */, E43B2BFA0D22A650009BAC44 /* qsamplerOptions.cpp */, E43B2BFB0D22A650009BAC44 /* qsamplerOptions.h */, E43B2BFC0D22A650009BAC44 /* qsamplerOptionsForm.cpp */, E43B2BFD0D22A650009BAC44 /* qsamplerOptionsForm.h */, E43B2BFE0D22A650009BAC44 /* qsamplerOptionsForm.ui */, E43B2BFF0D22A650009BAC44 /* qsamplerUtilities.cpp */, E43B2C000D22A650009BAC44 /* qsamplerUtilities.h */, ); name = src; path = ../src; sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */ /* Begin PBXLegacyTarget section */ E4102B730BCBD832006B57FE /* qsampler */ = { isa = PBXLegacyTarget; buildArgumentsString = "$(PROJECT_DIR)/wrapper.sh"; buildConfigurationList = E4102B740BCBD85E006B57FE /* Build configuration list for PBXLegacyTarget "qsampler" */; buildPhases = ( ); buildToolPath = /bin/sh; buildWorkingDirectory = ..; dependencies = ( ); name = qsampler; passBuildSettingsInEnvironment = 1; productName = libgig; }; /* End PBXLegacyTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "qsampler" */; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* LinuxSampler */; projectDirPath = ""; targets = ( E4102B730BCBD832006B57FE /* qsampler */, ); }; /* End PBXProject section */ /* Begin XCBuildConfiguration section */ 1DEB919408733D9F0010E9CD /* Development */ = { isa = XCBuildConfiguration; buildSettings = { GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Development; }; E4102B750BCBD85E006B57FE /* Development */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = linuxsampler; }; name = Development; }; E4102B770BCBD8A9006B57FE /* Deployment_ppc */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = linuxsampler; }; name = Deployment_ppc; }; E4102B780BCBD8A9006B57FE /* Deployment_i386 */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = linuxsampler; }; name = Deployment_i386; }; E4102B7B0BCBD8A9006B57FE /* Deployment_ppc */ = { isa = XCBuildConfiguration; buildSettings = { GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Deployment_ppc; }; E4102B7C0BCBD8A9006B57FE /* Deployment_i386 */ = { isa = XCBuildConfiguration; buildSettings = { GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Deployment_i386; }; E49D6A780BEE280600432768 /* Deployment_UB */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = linuxsampler; }; name = Deployment_UB; }; E49D6A790BEE280600432768 /* Deployment_UB */ = { isa = XCBuildConfiguration; buildSettings = { GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Deployment_UB; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "qsampler" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB919408733D9F0010E9CD /* Development */, E4102B7B0BCBD8A9006B57FE /* Deployment_ppc */, E4102B7C0BCBD8A9006B57FE /* Deployment_i386 */, E49D6A790BEE280600432768 /* Deployment_UB */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Development; }; E4102B740BCBD85E006B57FE /* Build configuration list for PBXLegacyTarget "qsampler" */ = { isa = XCConfigurationList; buildConfigurations = ( E4102B750BCBD85E006B57FE /* Development */, E4102B770BCBD8A9006B57FE /* Deployment_ppc */, E4102B780BCBD8A9006B57FE /* Deployment_i386 */, E49D6A780BEE280600432768 /* Deployment_UB */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Development; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; } qsampler-0.2.2/osx/qsampler.icns0000644000175000017500000013771310742437720016554 0ustar alessioalessioicnsICN#_—+"nU^/E.Kj{߇}KUicl4ooffon\f ooo ^oflזofo]VUl \]eoo\uWYooVf|]]Ufonofn|Vueofm\foooo\PfW] oofooomU]}ufluWvVffofooUuwgnnofoolveuVffoooofWVfgffoofvvggg\fofWVgfvffVfof`wggfvu|\yooofVvfvfWofvUW\ooifv}\W]fgfgfvWvuVoooogVgfefvffifoooofivffffnfnfofvoioooicl8UTTUU****UUUU****ONUUU***NUUU**OUUUU**1UU+*UUU0*UUT*yzͪͩ0O[yyxTZT0TN[N**10UTUT[TO**0*N*TTZTT**10y~UT0*0*TͩyΩyU*TͩǩTTTΣ~ͩͩͩTUxԣT~TZTxZZZxxy[ΣxͩU~~TZx~~~x[̜xZTZU~~~̣ͣǣil32: (kxC Dĸm Ļm7ѽ|pe`dSӺ}qeXL@3 +ʧ{peYMA5(( ]ÖxmaVKA6) % Ë}si]QC6)$EƉytmbUE5,'&*&\ttsnip? VmkpƼJZ_o-]O?Hbͽ\JHRbJ q)+9Ɋ  w' (1e) k= 'TJMe (db&!Pq7u`%}c"Pg~xqc:i Dzxrle/.zsUB9;Jcw{vqkeY 6by~{wrlbO0  ')'" (kxC Dĸm ȿw7ǯ|pfizy0¤}qeXL@3 /T ֪{pfZNA5( P]ϘyodZOE9- J ώ~wmcWJ>1% JFґ|xri]O@=AFLH:]wyzvw` ^uqxȿ _ahĶP rnKVzķvjir}w N0@Pļ3(!  P,9DOR(#   c'3;ACPyr<#  k%/6:=<:<[U% EA/58::9630F|`" 79;=<;9640,Xztz<  MDBCB@=951,)uohp) !khKFC?:61Erzpjd]O%#'gzsrwtojd^l, !/&.Ly}zvrqsvmR*8,/=AJW_a_[SG4 1?6(/10-)%   1<:(  +13/" $&%#      7JRUVTPF*+Pjr`H!RqrȴwrrhB8ir}rWBqyӸ}wrra$ArȽǗy}sra7p}ľx|~trVgtĽzrry~tr@Orǽysrt~~rf'pzļ{wtrtw{rENrȼ}ytr}}s\fwںƒ~ytrt{r"1s󻹿䒃~xsr}rCGw߲⹇|vr|rNP|ūՌysr{tRVٷⲬ{tryuTY޽ű}uryuSZ˩׽~vr|sPW߰ȩvr}rGLʟ~vr}r1'žݬ}trrxwftƿؚzsrr~rNXζwrrywp'Ԙsru|rOWӻurt~rg}ȼwrv~rp7(۽vr||rrA5­{u}wrqB*ȸ~uri8a{tqR!c}vjP+ 4V_b`\UK7 l8mk}}{}{}ich#H'R!J7Z%MD]%ۿT_knRDUgh% rK%껿]+v]j:omU__YVt+T^_ich4ofoffooooofofon\f\\ofop UVfo |ut}yVoof Uofol \lUVWfol]U~Vvooool\moofWo W^]nofeYfoo}mVVooeoon\W]imnoofo_fo\]vvoooofoo^\WWWWWnoffo||Wofomooo \\p fffU\|^oooooooooo}W \vf}mlooofofooowWU ]ufffueWefWeffofoono|VgVm\vfnifoooofgUgWWm]nfnooof|umevfw\fifnffooofVWegfflwfoffofefvgevvge}}vifooooofvvfvgffvg]nfoonuvgfvvfvvl\iooooffflvvwgfgegWofiggffvgevfm|\]uofooof}lvwfvgfvuofvgW|gfvgfg`lWoooofVeWu}u\mYfofvfu|]lWvVfoofvgW\u\u^ofigfvvgfvuWuefeffffvgfWVefnoooooofvvfgfvffooifggfifnonofofffvffifffofyfvofooofffffnnffonoffnfonfinnoofooich8 𪀀U*U*UU****UUUUUU****TUUUUUUU******N*UNUUxU+*+****0NUUyUUΪ+**$*$*OUUUU*+**N0UUUUΪU+**NUUUϣUU*N*U1UUUU*+*+UUUN0*UUUUUO**UΪǪ*NUU[yΤU**yͪͪȩNUO[[yyU[yxTTT0T0T*zy1N**1*10U01T[T[T豈Ty[yNT***T*N0TTZT0TxTUy***10U01TUT[T[y****0*TxZy****10yTxUΪN*0*0*0*Ty~ΩΩ~yU*10TͣyίͩͩǩxTTTTy~ΪͪͩͣTUTUT~ͩͣxTxxΩTͩͩ~T[xԣT͢TTZT~xxͣZyxTZxxy[yΩyTZ~~ΣTxxǣy~y[x~͢UZ~~xTxZx~xT~x[Ǣ~xZxTZU~[~~~~̢͢xxxT~T~~~~TUy̩̣̣̣ͩih32 (kkxCC DDĸmDDĸm Ļm77߁ѽ|ppe``dSS߁ѽ|ppe``dSSӺ}}qeXXL@@3 +ʧ{{peeYMAA5(((( ʧ{{peeYMAA5(((( ]ÖxxmaaVKKA6)) % Ë}ssii]QQC66)$$ Ë}ssii]QQC66)$$EEƉyytmmbbUEE5,,'&**&EEƉyytmmbbUEE5,,'&**&\\tsnniip?? VVmmkppƼVVmmkppƼJJZZ_oo-]]O??Hbbͽ\JHHRbbJ]]O??Hbbͽ\JHHRbbJqq)+99Ɋ ww' ((1ee))kk= ''TJkk= ''TJ MMe  (ddbb&!!Pqq7!!Pqq7u`` %%}cc"P g~~xqqcc"P g~~xqqcc::ii  DDzxxrllee/::ii  DDzxxrllee/.zzssUUB99;JJcw{{vqqkeeYY 6bbyy~~{wrrlbbO00  6bbyy~~{wrrlbbO00  '))'" (kkxCC DDĸmDDĸm ހ ȿw77ǯ|ppfiizyy00ǯ|ppfiizyy00¤}}qeXXL@@3 //T ֪{{pffZNAA5(( PP֪{{pffZNAA5(( PP]ϘyyoddZOOE9-- J ώ~wwmmcWWJ>>1% JJ ώ~wwmmcWWJ>>1% JJFFґ||xrrii]OO@==AFLLH:FFґ||xrrii]OO@==AFLLH:]]wyyzvvww `` "^^uuqxxȿ "^^uuqxxȿ $__aahĶP $rrnKKVzzķvjiir}}w $rrnKKVzzķvjiir}}w &N00@PPļ33(!  P,,9DDORR(#  & c''3;;ACCPPyr<## & c''3;;ACCPPyr<## & kk%%/66:==<<:<<[U%%  EEAA/558:966300F|`""  EEAA/558:966300F|`""  799;==<<;996440,XXzztzz<< $ MDDBCCBB@==9551,))uuohhpp)$ MDDBCCBB@==9551,))uuohhpp)$ !!kkhKKFFC??:661Errzppjdd]]O$ !!kkhKKFFC??:661Errzppjdd]]O$%%#''gzssrwwttojjd^^ll, !!/&&.LLy}zzvrqqsvvmRR !!/&&.LLy}zzvrqqsvvmRR*88,//=AAJJW__a__[SGG4 11?66(//110--)%%  11?66(//110--)%%   1<<:((  ++133//" ++133//" $$&&%##      77JRRUVTTPFF*++PPjr``HH++PPjr``HH!!RqqrrȴwrhBB8iir}}rW8iir}}rWBBqyyӸ}}wraa$%ArrȽǗy}}srra%ArrȽǗy}}srra(77p}}ľxx||~ttrVVggtĽzr y~~trr@ggtĽzr y~~trr@Orrǽyysrtt~&rrf''pzzļ{{wttr*tw{{rEE''pzzļ{{wttrtw{{rEENNrȼ }yyttr}}}}s\\NNrȼ }yyttr}}}}s\\ffwں ƒ~~yytrtt{rr"1ss󻻹 䒃~~xssr}rrC1ss󻻹 䒃~~xssr)}rrCGww߲⹇|vvr|rrNP||ūӀ Ռyysr{ttRP||ūӀ Ռyysr*{ttRVٷⲲ{{tr*yuuTY޽ű}}uryuuSZ˩׽~~vr|ssPZ˩׽~~vr|ssPW߰Ȁȩvr}rrGĹʟ~~vr}rr1Ĺʟ~~vr*}rr1'žݬ}}tr,xxwffttƿؚzzsr,~~rNNttƿؚzzsr+~~rNNXXζwwr,ywwp''XXζwwr3ywwp''Ԙssruu|rrOWӻurrt~~rggWӻurrt~~rgg(}}ȼwwrvv~rrp77((۽vvrr|rA((۽vvrr|rA"5­{{u}}wrrqBB**ȸ~~uurii8**ȸ~~uurii8aa{ttqqR!!cc}vvjPP++cc}vvjPP++ 4VV_bb`\UUK77 h8mk }}{}}}}{}{{{{}{{ics#H?ڿ{п?뿵Wics4ooVl^mfmVono }foofnuffvffooggflUoewyfgfugVfVoooffics8UU***NxUN+UU[*y**UT*0xΣTUTT~ΩZTx~xǣis321kCĥ7Ϻ}X@ + ]ŖxaK) %tbE,*kƳOH͇Hb='q"P~q.U9J{qe )kCԿ7–}X@ T ]ΘydO- J xiO=L: qȲ  nVѷi}  c3AP#  /8:60"  MBB=5)uh) #gswtj^,*,=J__G 1: &#  7RTFRrȗrh qӗwr$pķx~rOǸyrr~frȻyrrs1xrr}CPŴڌsr{RZ˳箢vr|PL䟆vr}1η֚srrИr|Oռr~p 5ݭ{}wqtRVbU7s8mk}{}icm#8Oicm4hool }o}U^foWVnWofnufenf}wfuog}WfffuuoofWnficm8U**OU*yUyͩ*0xΣTUx[T~~ǣit32;G(kxC (kxC (kxC (kxC D݁ЁāmD݁ЁāmD݁ЁāmD݁Ёām ށӁ΁ˁām7 ށӁ΁ˁām7 ށӁ΁ˁām7 ށӁ΁ˁām7߆ԁс|pe`dS߆ԁс|pe`dS߆ԁс|pe`dS߆ԁс|pe`dSӁρӂ}qeXL@3 +Ӂρӂ}qeXL@3 +Ӂρӂ}qeXL@3 +Ӂρӂ}qeXL@3 +ȁˁʁ{peYMA5(( ȁˁʁ{peYMA5(( ȁˁʁ{peYMA5(( ȁˁʁ{peYMA5(( ]ŁÁxmaVKA6) %]ŁÁxmaVKA6) %]ŁÁxmaVKA6) %]ŁÁxmaVKA6) % Á}si]QC6)$ Á}si]QC6)$ Á}si]QC6)$ Á}si]QC6)$EƁytmbUE5,'&*&EƁytmbUE5,'&*&EƁytmbUE5,'&*&EƁytmbUE5,'&*&EƁytmbUE5,'&*&\tsnip? \tsnip? \tsnip? \tsnip? VmkṕсƁVmkṕсƁVmkṕсƁVmkṕсƁJZ_óځ́-JZ_óځ́-JZ_óځ́-JZ_óځ́-]O?Hbہہ́\JHRbJ]O?Hbہہ́\JHRbJ]O?Hbہہ́\JHRbJ]O?Hbہہ́\JHRbJq)+9قہӁɁ q)+9قہӁɁ q)+9قہӁɁ q)+9قہӁɁ w' (1eǁ)w' (1eǁ)w' (1eǁ)w' (1eǁ)k= 'TJk= 'TJk= 'TJk= 'TJMe (db&Me (db&Me (db&Me (db&!Pq7!Pq7!Pq7!Pq7u`%}cu`%}cu`%}cu`%}c"Pg~xqc"Pg~xqc"Pg~xqc"Pg~xqc"Pg~xqc:i Dzxrle/:i Dzxrle/:i Dzxrle/:i Dzxrle/.zsUB9;Jcw{vqkeY.zsUB9;Jcw{vqkeY.zsUB9;Jcw{vqkeY.zsUB9;Jcw{vqkeY 6by~{wrlbO0 6by~{wrlbO0 6by~{wrlbO0 6by~{wrlbO0  ')'" ')'" ')'" ')'"(kxC (kxC (kxC (kxC D݁ЁāmD݁ЁāmD݁ЁāmD݁Ёām ޅԁՁԁЁȁw7 ޅԁՁԁЁȁw7 ޅԁՁԁЁȁw7 ޅԁՁԁЁȁw7߁ւ܁ށǁ|pfizy0߁ւ܁ށǁ|pfizy0߁ւ܁ށǁ|pfizy0߁ւ܁ށǁ|pfizy0Ӂԁ߂}qeXL@3 /T Ӂԁ߂}qeXL@3 /T Ӂԁ߂}qeXL@3 /T Ӂԁ߂}qeXL@3 /T ȁӁց{pfZNA5( PȁӁց{pfZNA5( PȁӁց{pfZNA5( PȁӁց{pfZNA5( P]΁ρyodZOE9- J]΁ρyodZOE9- J]΁ρyodZOE9- J]΁ρyodZOE9- J ρ~wmcWJ>1% J ρ~wmcWJ>1% J ρ~wmcWJ>1% J ρ~wmcWJ>1% JFҁ|xri]O@=AFLH:Fҁ|xri]O@=AFLH:Fҁ|xri]O@=AFLH:Fҁ|xri]O@=AFLH:Fҁ|xri]O@=AFLH:]wyzvw` ]wyzvw` ]wyzvw` ]wyzvw` ^ǁuqxȁ ^ǁuqxȁ ^ǁuqxȁ ^ǁuqxȁ _ahρ߂ԁāP _ahρ߂ԁāP _ahρ߂ԁāP _ahρ߂ԁāP rnKVźւсāvjir}w rnKVźւсāvjir}w rnKVźւсāvjir}w rnKVźւсāvjir}w N0@Płā3(! N0@Płā3(! N0@Płā3(! N0@Płā3(!  P,9DOR(#   P,9DOR(#   P,9DOR(#   P,9DOR(#   c'3;ACPyr<#  c'3;ACPyr<#  c'3;ACPyr<#  c'3;ACPyr<#  k%/6:=<:<[U%  k%/6:=<:<[U%  k%/6:=<:<[U%  k%/6:=<:<[U% EA/58:9630F|`" EA/58:9630F|`" EA/58:9630F|`" EA/58:9630F|`" 79;=<;9640,Xztz< 79;=<;9640,Xztz< 79;=<;9640,Xztz< 79;=<;9640,Xztz<  MDBCB@=951,)uohp) MDBCB@=951,)uohp) MDBCB@=951,)uohp) MDBCB@=951,)uohp) MDBCB@=951,)uohp) !khKFC?:61Erzpjd]O !khKFC?:61Erzpjd]O !khKFC?:61Erzpjd]O !khKFC?:61Erzpjd]O%#'gzsrwtojd^l,%#'gzsrwtojd^l,%#'gzsrwtojd^l,%#'gzsrwtojd^l, !/&.Ly}zvrqsvmR !/&.Ly}zvrqsvmR !/&.Ly}zvrqsvmR !/&.Ly}zvrqsvmR*8,/=AJW_a_[SG4 *8,/=AJW_a_[SG4 *8,/=AJW_a_[SG4 *8,/=AJW_a_[SG4 1?6(/10-)%  1?6(/10-)%  1?6(/10-)%  1?6(/10-)%   1<:(   1<:(   1<:(   1<:(  +13/" +13/" +13/" +13/" $&%#  $&%#  $&%#  $&%#          7JRUVTPF* 7JRUVTPF* 7JRUVTPF*+Pjr`H+Pjr`H+Pjr`H+Pjr`H!RqrƁԁ؁ԁȁwrhB!RqrƁԁ؁ԁȁwrhB!RqrƁԁ؁ԁȁwrhB!RqrƁԁ؁ԁȁwrhB8irځځӁ́ǁ}rW8irځځӁ́ǁ}rW8irځځӁ́ǁ}rW8irځځӁ́ǁ}rWBqyǁӁ}wra$BqyǁӁ}wra$BqyǁӁ}wra$BqyǁӁ}wra$Ar܁ցȁǁy}sraAr܁ցȁǁy}sraAr܁ցȁǁy}sraAr܁ցȁǁy}sra7p}܁́āx|~trV7p}܁́āx|~trV7p}܁́āx|~trV7p}܁́āx|~trVgt́тāzry~tr@gt́тāzry~tr@gt́тāzry~tr@gt́тāzry~tr@Or܁ǁysrt~rfOr܁ǁysrt~rfOr܁ǁysrt~rfOr܁ǁysrt~rf'pzҁā{wtrtw{rE'pzҁā{wtrtw{rE'pzҁā{wtrtw{rE'pzҁā{wtrtw{rENrсȁ}ytr}}s\Nrсȁ}ytr}}s\Nrсȁ}ytr}}s\Nrсȁ}ytr}}s\Nrсȁ}ytr}}s\fwځ́ց~ytrt{r"fwځ́ց~ytrt{r"fwځ́ց~ytrt{r"fwځ́ց~ytrt{r"1s󁻁́䁒~xsr}rC1s󁻁́䁒~xsr}rC1s󁻁́䁒~xsr}rC1s󁻁́䁒~xsr}rCGw߁ǁ⁹|vr|rNGw߁ǁ⁹|vr|rNGw߁ǁ⁹|vr|rNGw߁ǁ⁹|vr|rNP|ʁŁˁӅ΁ӁځՂysr{tRP|ʁŁˁӅ΁ӁځՂysr{tRP|ʁŁˁӅ΁ӁځՂysr{tRP|ʁŁˁӅ΁ӁځՂysr{tRVف⁲{tryuTVف⁲{tryuTVف⁲{tryuTVف⁲{tryuTYށقŁ}uryuSYށقŁ}uryuSYށقŁ}uryuSYށقŁ}uryuSZ؁ˁÂɁځׁ~vr|sPZ؁ˁÂɁځׁ~vr|sPZ؁ˁÂɁځׁ~vr|sPZ؁ˁÂɁځׁ~vr|sPWʁ߁āǂȅǁӁȁvr}rGWʁ߁āǂȅǁӁȁvr}rGWʁ߁āǂȅǁӁȁvr}rGWʁ߁āǂȅǁӁȁvr}rGLÁǁ̆ρ΁́ɁŁ́ʂ~vr}r1LÁǁ̆ρ΁́ɁŁ́ʂ~vr}r1LÁǁ̆ρ΁́ɁŁ́ʂ~vr}r1LÁǁ̆ρ΁́ɁŁ́ʂ~vr}r1'́Ӂׁق؁ׁԁЁˁŁρ܂݁}trxwf'́Ӂׁق؁ׁԁЁˁŁρ܂݁}trxwf'́Ӂׁق؁ׁԁЁˁŁρ܂݁}trxwf'́Ӂׁق؁ׁԁЁˁŁρ܂݁}trxwftށہՁ΁Ɓށڂց؁zsr~rNtށہՁ΁Ɓށڂց؁zsr~rNtށہՁ΁Ɓށڂց؁zsr~rNtށہՁ΁Ɓށڂց؁zsr~rNtށہՁ΁Ɓށڂց؁zsr~rNXفށׁρǁʁ݁ہׂӁ΁wrywp'Xفށׁρǁʁ݁ہׂӁ΁wrywp'Xفށׁρǁʁ݁ہׂӁ΁wrywp'Xفށׁρǁʁ݁ہׂӁ΁wrywp'܁فԂЁԁsru|rO܁فԂЁԁsru|rO܁فԂЁԁsru|rO܁فԂЁԁsru|rOWāށ݁ӂurt~rgWāށ݁ӂurt~rgWāށ݁ӂurt~rgWāށ݁ӂurt~rg}ԁˁŁځށځՁЁȁwrv~rp7}ԁˁŁځށځՁЁȁwrv~rp7}ԁˁŁځށځՁЁȁwrv~rp7}ԁˁŁځށځՁЁȁwrv~rp7(Ɓہ‚ƁŁvr|rA(Ɓہ‚ƁŁvr|rA(Ɓہ‚ƁŁvr|rA(Ɓہ‚ƁŁvr|rA5ǁځ݁‚{u}wrqB5ǁځ݁‚{u}wrqB5ǁځ݁‚{u}wrqB5ǁځ݁‚{u}wrqB*ǁ˂ȁ~uri8*ǁ˂ȁ~uri8*ǁ˂ȁ~uri8*ǁ˂ȁ~uri8a{tqR!a{tqR!a{tqR!a{tqR!c}vjP+c}vjP+c}vjP+c}vjP+4V_b`\UK7 4V_b`\UK7 4V_b`\UK7 t8mk@????????????????????????????????????????????????????????????????????????????qsampler-0.2.2/osx/autoconf_builder.sh0000644000175000017500000002071110742437720017717 0ustar alessioalessio#!/bin/sh # autoconf_builder.sh # Created by Toshi Nagata on 07/04/18. # # Copyright 2007 Toshi Nagata. # # Redistribution and use in source and binary forms, with or without modification, are permitted # provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of # conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, this list of # conditions and the following disclaimer in the documentation and/or other materials provided # with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Influential environmental variables: # ACTION(*): autoconf - run "make -f Makefile.cvs"; configure - run "configure"; # make - run "make"; install - run "make install"; # build (or empty string) - autoconf && configure && make (&& install) # "install" step is only done if WITH_INSTALL is non-empty # BUILD_STYLE(*): The build style. If it ends with "ppc" or "i386", it also specifies the architecture. # If it ends with "UB" or "Universal", it creates the Universal Binaries for the products # specified by $UB_PRODUCTS (see below). # If any of the products are missing, then this script is recursively called for # $BUILD_STYLE's that have "ppc" and "i386" in place of "UB" or "Universal". # WITH_INSTALL: When non-empty, "install" action is automatically done in "build" action. # CFLAGS, CXXFLAGS: Compiler flags # CONFIG_OPTIONS: Options for "configure" # BUILD_BASE_DIR: Temporary building and install directory. By default "$PWD/build". The source # tree is duplicated (by use of symbolic links) in $BUILD_BASE_DIR/$BUILD_STYLE/.build, # where is the basename of the toplevel directory of the source tree (which also # should be the current directory when this script is invoked). The product is "installed" # into $BUILD_BASE_DIR/$BUILD_STYLE/local. # SDKROOT: The root directory for SDK # UB_PRODUCTS: The products for which Universal Binaries are to be created. The paths should be # relative to $BUILD_BASE_DIR/$BUILD_STYLE/local. Eg. bin/some_executable, lib/some_library.a. # UB_ARCHS: The target architectures for the "UB" build style. If not specified, "ppc i386" is assumed. # UB_ONEPASS: When non-empty, building "UB" is done with the compiler flag like "-arch i386 -arch ppc". # Otherwise, binaries for each architecture are separately built and combined later by lipo. # # The variables marked with (*) are automatically set by Xcode. BASE_DIR=$PWD BASE_NAME=`basename $PWD` UB_ARCHS=${UB_ARCHS:-"ppc i386"} function rel2abs () { (cd "$1"; pwd) } function abs2rel () { /usr/bin/perl -e 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1]), "\n";' "$1" "$2" } function link_recursive () { local arg base i arg="$1" base=`basename "$arg"` if test -d "$arg"; then if expr "$base" = "CVS" "|" `rel2abs "$arg"` = "$BUILD_BASE_DIR" >/dev/null; then echo "Skipping directory $arg" else echo "Copying directory $arg" mkdir -p "$base" cd "$base" if ! expr "$arg" : "^/" >/dev/null; then arg="../$arg" fi for i in "$arg"/*; do link_recursive "$i" done cd .. fi else echo "Linking $arg" ln -sf $arg fi } # Sanity checks if test "x$BUILD_STYLE" = "x"; then BUILD_STYLE="Default" fi if test "x$ACTION" = "x"; then ACTION="build" fi if test "x$BUILD_BASE_DIR" = "x"; then BUILD_BASE_DIR=$PWD/../temp_build fi mkdir -p "$BUILD_BASE_DIR" || exit $? export BUILD_BASE_DIR=`rel2abs "$BUILD_BASE_DIR"` if test -e "$SDKROOT"; then SYSROOT_CFLAGS="-isysroot $SDKROOT" else SYSROOT_CFLAGS= fi if ! expr "$arg" : ".*/usr/local/bin.*" >/dev/null; then PATH=${PATH/\/usr\/bin/\/usr\/local\/bin:\/usr\/bin} fi ARCH_CFLAGS="" ARCH_CONFIG_OPTIONS="" case "$BUILD_STYLE" in *ppc) ARCH="ppc" ARCH_CFLAGS="-arch ppc" ;; *ppc64) ARCH="ppc64" ARCH_CFLAGS="-arch ppc64" ARCH_CONFIG_OPTIONS="--host=ppc64-apple-darwin8" if expr "$BASE_NAME" : "libsndfile" >/dev/null; then # For shortcut endianness detection in libsndfile 1.0.17 export ac_cv_c_byte_order=big fi ;; *i386) ARCH="i386" ARCH_CFLAGS="-arch i386 -msse -msse2" ARCH_CONFIG_OPTIONS="--host=i386-apple-darwin8" ;; *x86_64) ARCH="x86_64" ARCH_CFLAGS="-arch x86_64 -m64" ARCH_CONFIG_OPTIONS="--host=x86_64-apple-darwin8" ;; *UB) ARCH="UB" BUILD_STYLE_BASE=${BUILD_STYLE/UB/} ;; *Universal) ARCH="UB" BUILD_STYLE_BASE=${BUILD_STYLE/Universal/} ;; *) echo "Warning: architecture cannot be recognized from the build style" ARCH="unknown" ;; esac case "$BUILD_STYLE" in Development|Default) OPT_CFLAGS="-O2 -g" ;; Deployment*) OPT_CFLAGS="-O3" ;; esac if test "x$ARCH" = "xUB"; then for arch in $UB_ARCHS; do case $arch in ppc) ARCH_CFLAGS="$ARCH_CFLAGS -arch ppc" ;; *ppc64) ARCH_CFLAGS="$ARCH_CFLAGS -arch ppc64" ;; *i386) ARCH_CFLAGS="$ARCH_CFLAGS -arch i386 -msse -msse2" ;; *x86_64) ARCH_CFLAGS="$ARCH_CFLAGS -arch x86_64 -m64" ;; esac done fi if test "x$ARCH" = "xUB" -a "x$ACTION" != "xclean" -a "x$UB_ONEPASS" = "x"; then # Test the existence of the products for arch in $UB_ARCHS; do style=${BUILD_STYLE_BASE}${arch} # BUILD_STYLE_PPC=${BUILD_STYLE_BASE}ppc # BUILD_STYLE_386=${BUILD_STYLE_BASE}i386 # for style in $BUILD_STYLE_PPC $BUILD_STYLE_386; do missing=no for i in $UB_PRODUCTS; do if ! test -e "$BUILD_BASE_DIR/$style/local/$i"; then missing=yes fi done if test "$missing" = "yes"; then BUILD_STYLE_SAVE=$BUILD_STYLE export BUILD_STYLE=$style echo "Building with BUILD_STYLE=$style" /bin/sh $0 || exit $? BUILD_STYLE=$BUILD_STYLE_SAVE fi done mkdir -p "$BUILD_BASE_DIR/$BUILD_STYLE/local" || exit $? cd "$BUILD_BASE_DIR" for i in $UB_PRODUCTS; do archbins="" for arch in $UB_ARCHS; do archbins="$archbins $BUILD_BASE_DIR/${BUILD_STYLE_BASE}${arch}/local/$i" done mkdir -p "$BUILD_STYLE/local/"`dirname $i` || exit $? echo "Creating universal binary $BUILD_STYLE/local/$i" lipo -create $archbins -output "$BUILD_STYLE/local/$i" || exit $? done exit $? fi export CFLAGS="$SYSROOT_CFLAGS $ARCH_CFLAGS $OPT_CFLAGS $CFLAGS" export CXXFLAGS="$SYSROOT_CFLAGS $ARCH_CFLAGS $OPT_CFLAGS $CXXFLAGS" # Move to the working directory BUILD_DIR="$BUILD_BASE_DIR/$BUILD_STYLE/$BASE_NAME.build" mkdir -p "$BUILD_DIR" BUILD_DIR=`rel2abs "$BUILD_DIR"` CONFIG_OPTIONS="--prefix=$BUILD_BASE_DIR/$BUILD_STYLE/local $CONFIG_OPTIONS" # Display all environments set cd $BUILD_DIR # Clean if specified if test "x$ACTION" = "xclean"; then # if test "x$WITH_INSTALL" != "x" -a -e "Makefile"; then # echo "Doing make uninstall" # make uninstall # fi echo "Removing files in $BUILD_DIR" cd $BASE_DIR rm -rf "$BUILD_DIR" echo "Removing product files in $BUILD_BASE_DIR/$BUILD_STYLE/local" (cd "$BUILD_BASE_DIR/$BUILD_STYLE/local"; rm -rf $UB_PRODUCTS) exit $? fi if test "x$ACTION" = "xbuild" -o "x$ACTION" = "xconfigure"; then # Copy the source files if necessary if test ! -e Makefile -a ! -e configure -a ! -e Makefile.cvs; then echo "Copying the source files to $BUILD_DIR" for i in `abs2rel "$BASE_DIR" "$BUILD_DIR"`/*; do link_recursive $i done fi # Make ./configure if necessary if test -e Makefile.cvs -a ! -e configure; then echo "Running make -f Makefile.cvs" make -f Makefile.cvs || exit $? fi # Run ./configure if necessary if test -e configure -a ! -e Makefile; then CONFIG_ARGS="$CONFIG_OPTIONS $ARCH_CONFIG_OPTIONS $CONFIG_ENVS" echo "Running configure $CONFIG_ARGS" ./configure $CONFIG_ARGS || exit $? fi fi if test "x$ACTION" = "xbuild" -o "x$ACTION" = "xmake"; then # make echo "Running make" make || exit $? fi # make install if specified if test "x$ACTION" = "xinstall" -o "(" "x$ACTION" = "xbuild" -a "x$WITH_INSTALL" != "x" ")"; then echo "Running make install" make install || exit $? fi qsampler-0.2.2/osx/wrapper.sh0000644000175000017500000000764610742437720016067 0ustar alessioalessioexport QTDIR=/usr/local/Trolltech/Qt-4.3.3 export PATH=$QTDIR/bin:$PATH export QMAKESPEC=$QTDIR/mkspecs/macx-g++ export DYLD_LIBRARY_PATH=$QTDIR/lib #export WITH_INSTALL=1 export BUILD_BASE_DIR=$PWD/../temp_build export CONFIG_OPTIONS="--disable-shared" export C_INCLUDE_PATH="$BUILD_BASE_DIR/$BUILD_STYLE/local/include:$QTDIR/include" export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH export LIBRARY_PATH="$BUILD_BASE_DIR/$BUILD_STYLE/local/lib:$QTDIR/lib" export CFLAGS="-framework CoreFoundation" export CXXFLAGS=$CFLAGS export PKG_CONFIG_PATH="$BUILD_BASE_DIR/$BUILD_STYLE/local/lib/pkgconfig" #export HAVE_UNIX98=1 export UB_PRODUCTS=bin/qsampler.app # Dummy (for 'clean' target) case "$BUILD_STYLE" in *UB) BUILD_STYLE_BASE=${BUILD_STYLE/UB/} if test "x$ACTION" = "xclean"; then source $PROJECT_DIR/autoconf_builder.sh exit 0 fi BUILD_STYLE="${BUILD_STYLE_BASE}ppc" /bin/sh $0 || exit $? BUILD_STYLE="${BUILD_STYLE_BASE}i386" /bin/sh $0 || exit $? BUILD_STYLE="${BUILD_STYLE_BASE}UB" ODIR=`dirname "$0"` cd "$BUILD_BASE_DIR" cp -r "${BUILD_STYLE_BASE}ppc/local/bin/qsampler.app" "${BUILD_STYLE_BASE}UB/local/bin" echo "qsampler.app has been copied to $BUILD_BASE_DIR/$BUILD_STYLE/local/bin" XDIR="local/bin/qsampler.app/Contents/MacOS" lipo -create "${BUILD_STYLE_BASE}ppc/$XDIR/qsampler" "${BUILD_STYLE_BASE}i386/$XDIR/qsampler" -output "$BUILD_STYLE/$XDIR/qsampler" || exit $? # A trick: rename the executable to "qsampler " (note the whitespace) and place a wrapper # script as "qsampler" # cd "$BUILD_STYLE/$XDIR" # mv qsampler "qsampler " # cp "$ODIR/qsampler.wrapper" ./qsampler # chmod +x qsampler # Place the icon file and modify the Info.plist file cd "$BUILD_STYLE/$XDIR/.." # qsampler.app/Contents rm -rf Resources mkdir Resources cp "$ODIR/qsampler.icns" Resources/ mv Info.plist Info.plist~ sed '/CFBundleIconFile/,//s/.*<\/string>/qsampler.icns<\/string>/' Info.plist~ >Info.plist rm Info.plist~ # Embed the Qt frameworks and plugins if test -e /Library/Frameworks/QtCore.framework; then # Copy frameworks mkdir -p Frameworks rm -rf Frameworks/* QTLIBS="QtCore QtGui QtSvg QtXml" for lib in $QTLIBS; do cp -R /Library/Frameworks/$lib.framework ./Frameworks/ done # Copy plugins rm -rf plugins mkdir -p plugins/imageformats QTPLUGINS="libqgif libqjpeg libqmng libqsvg libqtiff" for plugin in $QTPLUGINS; do cp -R /Developer/Applications/Qt/plugins/imageformats/$plugin.dylib ./plugins/imageformats/ done # Update the install names so that the executable can find the correct frameworks for lib in $QTLIBS; do install_name_tool -change $lib.framework/Versions/4/$lib @executable_path/../Frameworks/$lib.framework/Versions/4/$lib MacOS/qsampler install_name_tool -id @executable_path/../Frameworks/$lib.framework/Versions/4/$lib Frameworks/$lib.framework/Versions/4/$lib for lib2 in $QTLIBS; do install_name_tool -change $lib.framework/Versions/4/$lib @executable_path/../Frameworks/$lib.framework/Versions/4/$lib Frameworks/$lib2.framework/Versions/4/$lib2 done for plugin in $QTPLUGINS; do install_name_tool -change $lib.framework/Versions/4/$lib @executable_path/../Frameworks/$lib.framework/Versions/4/$lib plugins/imageformats/$plugin.dylib done done fi cp -f "$ODIR/linuxsampler.starter" $BUILD_BASE_DIR/$BUILD_STYLE/local/bin/ chmod +x "$BUILD_BASE_DIR/$BUILD_STYLE/local/bin/linuxsampler.starter" echo "Universal binary package qsampler.app has been created in $BUILD_BASE_DIR/$BUILD_STYLE/local/bin" exit 0 ;; *ppc) export QMAKE_ARCHS="ppc" ;; *i386) export QMAKE_ARCHS="x86" ;; esac source $PROJECT_DIR/autoconf_builder.sh if test "x$ACTION" != "xclean"; then # "install" mkdir -p "$BUILD_BASE_DIR/$BUILD_STYLE/local/bin" cp -r "$BUILD_DIR/qsampler.app" "$BUILD_BASE_DIR/$BUILD_STYLE/local/bin" echo "qsampler.app has been copied to $BUILD_BASE_DIR/$BUILD_STYLE/local/bin" fi qsampler-0.2.2/osx/linuxsampler.starter0000754000175000017500000000270610742437720020176 0ustar alessioalessio#!/bin/sh # linuxsampler.starter # In the binary distribution, this wrapper script is placed in the same # directory as qsampler.app. The "true" binary of linuxsampler is placed # as bin/linuxsampler. This wrapper script creates the default instrument # database if not present, starts the Jack server, launches the JackPilot # application via AppleScript, # and finally invokes the "true" binary of linuxsampler. # 1 Jan 2008 Toshi Nagata # 4 Jan 2008 Redirect stderr of osascript to /dev/null to avoid misleading # error messages (Toshi Nagata) # Set up the "base" directory COMNAME=`which "$0"` DIRNAME=`dirname "$COMNAME"` # Create database if not present if ! test -e $HOME/Library/linuxsampler/linuxsampler.db; then mkdir -p $HOME/Library/linuxsampler/plugins "$DIRNAME/bin/linuxsampler" --create-instruments-db $HOME/Library/linuxsampler/linuxsampler.db fi # Start jackd if test -e $HOME/.jackdrc; then # Collect the options jackopt=`awk '/^-/ { x = x $0 } END { print x }' $HOME/.jackdrc` else jackopt="-R -d coreaudio" fi /usr/local/bin/jackd $jackopt & # If already running, then it just exits # Start JackPilot # (Errors will be silently ignored) osascript -e 'tell application "JackPilot" to activate' -e 'tell application "qsampler" to activate' 2>/dev/null & # Invoke linuxsampler if test -e "$DIRNAME/bin/linuxsampler"; then exe="$DIRNAME/bin/linuxsampler" else exe="$DIRNAME/linuxsampler" fi exec "$exe" $@ qsampler-0.2.2/TODO0000644000175000017500000000136610721636556013730 0ustar alessioalessioQsampler - A LinuxSampler Qt GUI Interface ------------------------------------------ TODOs - Complete coverage of the LinuxSampler Control Protocol: - Support for FX Sends - Allowing to create more than the two standard MIDI instrument maps ("Chromatic" / "Drumkits"). - Instruments DB support. - Support for handling sampler events (see chapter 5.2 "Subscribe/notify communication method" of the LSCP specs). - Support for handling "multiplicity" type parameters in the device management dialog (i.e. for parameter "ALSA_SEQ_BINDINGS" of LS's ALSA MIDI driver, allowing to make arbitrary amount of MIDI connections). At the moment one can only set a scalar value for these parameter types. - Any feature one can think of ;) qsampler-0.2.2/README0000644000175000017500000000554510721261664014115 0ustar alessioalessioQsampler - A LinuxSampler Qt GUI Interface ------------------------------------------ Qsampler is a LinuxSampler GUI front-end application written in C++ around the Qt4 toolkit using Qt Designer. At the moment it just wraps as a client reference interface for the LinuxSampler Control Protocol (LSCP). LinuxSampler is a work in progress. The goal is to produce a free, open source pure software audio sampler with professional grade features, comparable to both hardware and commercial Windows/Mac software samplers. The initial platform will be Linux because it is one of the most promising open source multimedia operating systems. Thanks to various kernel patches and the Jack Audio Connection Kit, Linux is currently able to deliver rock solid sub-5 millisecond MIDI-to-Audio response. Homepage: http://qsampler.sourceforge.net See also: http://www.linuxsampler.org License: GNU General Public License (GPL) Requirements ------------ The software requirements for build and runtime are listed as follows: Mandatory: - Qt 4 (core, gui), C++ class library and tools for crossplatform development and internationalization http://www.trolltech.org/products/qt/ - liblscp, C library for LinuxSampler control protocol API. http://www.linuxsampler.org/ Optional (opted-in at build time): - libgig, C++ library for loading and modifying Gigasampler and DLS files. http://www.linuxsampler.org/libgig/ Installation ------------ The installation procedure follows the standard for source distributions. Unpack the tarball and in the extracted source directory: ./configure [--prefix=/usr/local] make and optionally as root: make install This procedure will end installing the following couple of files: ${prefix}/bin/qsampler ${prefix}/share/pixmaps/qsampler.png ${prefix}/share/applications/qsampler.desktop Just launch ${prefix}/bin/qsampler and you're off (hopefully). Note that the default installation path ${prefix} is /usr/local. If you're checking out from CVS, you'll have to prepare the configure script just before you proceed with the above instructions: make -f Makefile.cvs Configuration ------------- Qsampler holds its settings and configuration state per user, in a file located as $HOME/.config/linuxsampler.org/Qsampler.conf . Normally, there's no need to edit this file, as it is recreated and rewritten everytime qsampler is run. Bugs ---- Plenty as this is still alpha software. Bug reports should be posted on LinuxSampler bug tracker (http://bugs.linuxsampler.org). Support ------- Qsampler is open source free software. For bug reports, feature requests, discussion forums, mailling lists, or any other matter related to the development of this piece of software, please use the LinuxSampler project site (http://www.linuxsampler.org). Enjoy. rncbc aka Rui Nuno Capela rncbc at rncbc dot org qsampler-0.2.2/win32/0000755000175000017500000000000011236104755014165 5ustar alessioalessioqsampler-0.2.2/win32/qsampler.pro0000644000175000017500000000356211162445325016540 0ustar alessioalessioINCPATH += ../src HEADERS = ../src/qsamplerAbout.h \ ../src/qsamplerOptions.h \ ../src/qsamplerChannel.h \ ../src/qsamplerMessages.h \ ../src/qsamplerInstrument.h \ ../src/qsamplerInstrumentList.h \ ../src/qsamplerDevice.h \ ../src/qsamplerFxSend.h \ ../src/qsamplerFxSendsModel.h \ ../src/qsamplerUtilities.h \ ../src/qsamplerInstrumentForm.h \ ../src/qsamplerInstrumentListForm.h \ ../src/qsamplerDeviceForm.h \ ../src/qsamplerDeviceStatusForm.h \ ../src/qsamplerChannelStrip.h \ ../src/qsamplerChannelForm.h \ ../src/qsamplerChannelFxForm.h \ ../src/qsamplerOptionsForm.h \ ../src/qsamplerMainForm.h SOURCES = ../src/main.cpp \ ../src/qsamplerOptions.cpp \ ../src/qsamplerChannel.cpp \ ../src/qsamplerMessages.cpp \ ../src/qsamplerInstrument.cpp \ ../src/qsamplerInstrumentList.cpp \ ../src/qsamplerDevice.cpp \ ../src/qsamplerFxSend.cpp \ ../src/qsamplerFxSendsModel.cpp \ ../src/qsamplerUtilities.cpp \ ../src/qsamplerInstrumentForm.cpp \ ../src/qsamplerInstrumentListForm.cpp \ ../src/qsamplerDeviceForm.cpp \ ../src/qsamplerDeviceStatusForm.cpp \ ../src/qsamplerChannelStrip.cpp \ ../src/qsamplerChannelForm.cpp \ ../src/qsamplerChannelFxForm.cpp \ ../src/qsamplerOptionsForm.cpp \ ../src/qsamplerMainForm.cpp FORMS = ../src/qsamplerInstrumentForm.ui \ ../src/qsamplerInstrumentListForm.ui \ ../src/qsamplerDeviceForm.ui \ ../src/qsamplerChannelStrip.ui \ ../src/qsamplerChannelForm.ui \ ../src/qsamplerChannelFxForm.ui \ ../src/qsamplerOptionsForm.ui \ ../src/qsamplerMainForm.ui RESOURCES = ../icons/qsampler.qrc TEMPLATE = app CONFIG += qt thread warn_on release LANGUAGE = C++ LIBS += -llscp win32 { CONFIG += console INCPATH += C:\usr\local\include LIBS += -LC:\usr\local\lib -lws2_32 } TRANSLATIONS = ../translations/qsampler_ru.ts qsampler-0.2.2/win32/config.h0000644000175000017500000000115311235071265015601 0ustar alessioalessio #define PACKAGE_NAME "Qsampler" #define PACKAGE_VERSION "0.2.2" #define CONFIG_PREFIX "." #define CONFIG_DEBUG 1 #if defined(__MINGW32__) #define CONFIG_ROUND 1 #endif #define CONFIG_INSTRUMENT_NAME 1 #define CONFIG_MUTE_SOLO 1 #define CONFIG_EDIT_INSTRUMENT 1 #define CONFIG_MIDI_INSTRUMENT 1 #define CONFIG_AUDIO_ROUTING 1 #define CONFIG_FXSEND 1 #define CONFIG_FXSEND_LEVEL 1 #define CONFIG_FXSEND_RENAME 1 #define CONFIG_VOLUME 1 #define CONFIG_EVENT_CHANNEL_MIDI 1 #define CONFIG_EVENT_DEVICE_MIDI 1 #define CONFIG_MAX_VOICES 1 #undef HAVE_SIGNAL_H qsampler-0.2.2/translations/0000755000175000017500000000000011236104755015744 5ustar alessioalessioqsampler-0.2.2/translations/qsampler_ru.ts0000644000175000017500000035222411175633540020657 0ustar alessioalessio MidiInstrumentsModel Name Название Map Карта Bank Банк Prog Программа Engine Движок File Файл Nr Vol Громкость Mode Режим Could not get current list of MIDI instrument mappings. Sorry. Не удалось получить актуальный список привязок инструментов MIDI. Извините. QObject Could not add channel. Sorry. Не удалось добавить канал. Извините. added. добавлен. Could not remove channel. Sorry. Не удалось удалить канал. Извините. removed. удален. New Channel Новый канал Channel %1 Канал %1 Engine: %1. Движок: %1. Instrument: "%1" (%2). Инструмент: "%1" (%2). MIDI driver: %1. Драйвер MIDI: %1. MIDI device: %1. Устройство MIDI: %1. MIDI port: %1. Порт MIDI: %1. MIDI channel: %1. Канал MIDI: %1. MIDI map: %1. Карта MIDI: %1. Audio device: %1. Звуковое устройство: %1. Audio driver: %1. Звуковой драйвер: %1. Volume: %1. Громкость: %1. Mute: %1. Приглушение: %1. Solo: %1. Солирование: %1. Audio Channel: %1 -> %2. Звуковой канал: %1 -> %2. Could not get channel information. Sorry. Не удалось получить информацию о канале. Извините. (none) (нет) reset. Could not launch an appropriate instrument editor for the given instrument! Make sure you have an appropriate instrument editor like 'gigedit' installed and that it placed its mandatory DLL file into the sampler's plugin directory. Не удалось запустить подходящий редактор для этого инструмента! Убедитесь, что в системе установлен необходимый редактор вроде gigedit, и что его файл DLL размещен в папке с расширениями сэмплера. edit instrument. Sorry, QSampler was compiled for a version of liblscp which lacks this feature. You may want to update liblscp and recompile QSampler afterwards. Извините, но QSampler был собран с версией liblscp, где эта функция не реализована. Вероятно вам стоит обновить версию liblscp и пересобрать QSampler. setup... (No engine) (нет движка) (No instrument) (нет инструмента) (Loading instrument...) (загружается инструмент...) Device Channel Канал устройства Audio Channel Звуковой канал channel fx sends... Audio Звук MIDI MIDI New %1 device Новое устройство %1 Device %1 Устройство %1 Could not set device parameter value. Sorry. Не удалось установить значение параметра. Извините. created. создано. Could not create device. Sorry. Не удалось создать устройство Извините. deleted. удалено Could not delete device. Sorry. Не удалось удалить устройство Извините. Could not set %1 parameter value. Sorry. Не удалось установить значение параметра %1. Извините. Audio Devices Звуковые устройства MIDI Devices Устройства MIDI Persistent Непрерывно On Demand Hold On Demand По требованию Usage: %1 [options] [session-file] Использование: %1 [ключи] [файл-сеанса] Option -h requires an argument (hostname). Ключу -h нужен аргумент (имя хоста). Option -p requires an argument (port). Ключу -p нужен аргумент (номер порта). Qt: %1 Qt: %1 Sent fine tuning settings. QSampler::AbstractDeviceParamModel Parameter Параметр Value Значение Description Описание QSampler::ChannelForm Some channel settings could not be set. Sorry. Не удалось задать некоторые параметры канала. Извините. Warning Предупреждение Some channel settings have been changed. Do you want to apply the changes? Некоторые параметры канала изменились. Вы хотите применить эти изменения? Apply Применить Discard Отказаться Cancel Отменить Instrument files Файлы инструментов (New MIDI %1 device) (Новое устройство MIDI %1) (New Audio %1 device) (Новое звуковое устройство %1) QSampler::ChannelStrip Unavailable Недоступно Sorry, QSampler was built without FX send support! (Make sure you have a recent liblscp when recompiling QSampler) Извините, но QSampler был собран без поддержки посыла эффектов! Убедитесь, что в системе установлена достаточно новая версия liblscp. All Все ERR%1 ERR%1 QSampler::DeviceForm Warning Предупреждение About to delete device: %1 Are you sure? Будет удалено устройство: %1 Вы уверены? OK &OK Cancel О&тменить Ch&annel: &Канал: P&ort: &Порт: &Create device &Создать устройство &Delete device &Удалить устройство &Refresh О&бновить QSampler::DeviceParamDelegate (none) (нет) QSampler::InstrumentForm Instrument files Файлы инструментов Warning Предупреждение Some channel settings have been changed. Do you want to apply the changes? Некоторые параметры канала изменились. Вы хотите учесть эти изменения? Apply Применить Discard Отказаться Cancel Отменить QSampler::InstrumentListForm Instrument Map Карта инструментов (All) (Все) Warning Предупреждение About to delete instrument map entry: %1 Are you sure? Элемент карты инструментов будет удален: %1 Вы уверены? OK OK Cancel Отменить QSampler::MainForm Master volume Общая громкость Connected Установлено соединение с MOD Ready Готов Notify event: %1 data: %2 Untitled Без названия New session: "%1". Новый сеанс: "%1". Open Session Открыть сеанс LSCP Session files Файлы сеансов LSCP Save Session Сохранить сеанс Warning Предупреждение The file already exists: "%1" Do you want to replace it? Такой файл уже существует: "%1" Заменить его? Replace Заменить Cancel Отменить The current session has been changed: "%1" Do you want to save the changes? Текущий сеанс изменился: "%1" Вы хотите сохранить эти изменения? Save Сохранить Discard Отказаться Could not open "%1" session file. Sorry. Не удалось открыть файл сеанса "%1". Извините. Session loaded with errors from "%1". Sorry. Сеанс загружен с ошибками из "%1". Извините. Open session: "%1". Открыть сеанс: "%1". Version Версия Build Сборка File Файл Date Дата Device Устройство MIDI instrument map Карта инструментов MIDI Channel Канал Global volume level Общий уровень громкости Some settings could not be saved to "%1" session file. Sorry. Некоторые параметры не удалось сохранить в файл сеанса "%1". Извините. Save session: "%1". Сохранить сеанс: "%1". Resetting the sampler instance will close all device and channel configurations. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to reset the sampler engine now? Перезагрузка движка сэмплера приведет к закрытию всех устройств и каналов. Это может привести к временному разрыву в воспроизведении MIDI и звука. Вы хотите перезапустить движок сэмплера? Reset Сбросить Could not reset sampler instance. Sorry. Не удалось перезапустить движок сэмплера. Извините. Sampler reset. Перезагрузка сэмплера. New settings will be effective after restarting the client/server connection. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to restart the connection now? Новые параметры возымеют эффект после перезапуска соединения клиента с сервером. Это может привести к временному разрыву в воспроизведении MIDI и звука. Вы хотите заново установить соединение клиента и сервера? Restart Перезапустить About to remove channel: %1 Are you sure? Будет удален канал: %1 Вы уверены? OK OK Information Справка Some settings may be only effective next time you start this program. Некоторые новые параметры возымеют силу только при следующем запуске программы. Debugging option enabled. Функция отладки включена. GIG (libgig) file support disabled. Поддержка сэмплов GIG (libgig) отключена. LSCP (liblscp) instrument_name support disabled. Поддержка функции instrument_name в LSCP (liblscp) отключена. Sampler channel Mute/Solo support disabled. Поддержка приглушения/солирования канала отключена. LSCP (liblscp) audio_routing support disabled. Поддержка функции audio_routing в LSCP (liblscp) отключена. Sampler channel Effect Sends support disabled. Поддержка поканального посыла эффектов отключена. Global volume support disabled. Поддержка общего регулятора громкости отключена. MIDI instrument mapping support disabled. Поддержка свызывания инструментов MIDI отключена. Instrument editing support disabled. Функция редактирования инструментов отключена. Channel MIDI event support disabled. Device MIDI event support disabled. Runtime max. voices / disk streams support disabled. Поддержка ограничения числа голосов/дисковых потоков отключена. Using Использует Website Сайт This program is free software; you can redistribute it and/or modify it Эта программа является свободной; вы можете распространять и/или under the terms of the GNU General Public License version 2 or later. изменять ее на условиях GNU GPL версии 2 или новее. About О программе Chromatic Хроматическая Drum Kits Перкуссия Could not get current list of channels. Sorry. Не удалось получить актуальный список каналов. Извините. Error Ошибка Could not start the LinuxSampler server. Maybe it is already started. Не удалось запустить сервер LinuxSampler. Возможно, он уже запущен. Stop Остановить Kill Убить Server is starting... Запускается сервер... Could not start server. Sorry. Не удалось запустить сервер. Извините. Server was started with PID=%1. Сервер запущен с PID=%1. The backend's fate ... Что делать с движком You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop or to keep running in the background? Вы можете оставить движок сэмплера (LinuxSampler) работающим в фоновом режиме. Сэмплер продолжит работать с текущим сеансом, и при следующем запуске QSampler вы сможете изменить параметры сеанса. Хотите ли вы остановить LinuxSampler или же оставить его работающим в фоновом режиме? Server is stopping... Останавливается сервер... Server is being forced... Server was stopped with exit status %1. Сервер был остановлен со статусом выхода %1. Client connecting... Устанавливается соединения клиента... Could not connect to server as client. Sorry. Не удалось соединиться с сервером в качестве клиента. Извините. Client receive timeout is set to %1 msec. Client connected. Клиент соединился. Client disconnecting... Выполняется отсоединение клиента... Client disconnected. Клиент отсоединен. You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop? QSampler::Messages Messages Сообщения Logging stopped --- %1 --- Ведение журнала остановлено --- %1 --- Logging started --- %1 --- Ведение журнала начато --- %1 --- QSampler::OptionsForm This parameter is not supported by the current sampler version in use. Этот параметр не поддерживается используемой версией сэмплера. The max. amount of voices the sampler shall process simultaniously. The max. amount of disk streams the sampler shall process simultaniously. QSampler was built without support for this parameter. QSampler был собран без поддержки этого параметра. Warning Предупреждение Some settings have been changed. Do you want to apply the changes? Некоторые параметры были изменены. Вы хотите применить изменения? Apply Применить Discard Отказаться Cancel Отменить Messages Log Журнал сообщений Log files Файлы журналов qsamplerChannelForm Qsampler: Channel Qsampler: Канал Browse for instrument filename Указать файл инструмента Instrument name Название инструмента &Engine: &Движок: Engine name Название движка &Filename: Имя &файла: &Instrument: &Инструмент: Instrument filename Имя файла инструмента MIDI / Input MIDI / вход MIDI input device Устройство MIDI для входа MIDI input device setup Настроить устройство MIDI для входа &Map: &Карта: &Device: &Устройство: Instrument map Карта инструментов &Type: &Тип: MIDI input driver type Тип драйвера MIDI для входа &Port: &Порт: MIDI input port number Номер порта MIDI для входа &Channel: &Канал: MIDI input channel Канал MIDI для входа 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 All Все Audio / Output Звук / выход Audio output device Устройство вывода звука Audio output device setup Настроить устройство вывода звука Audio output driver type Тип устройства вывода звука Audio routing table Таблица маршрутизации звука OK &OK Cancel О&тменить qsamplerChannelFxForm Channel Effects Эффекты канала FX Send Selection Выбор посыла эффектов Creates a new FX Send. You have to select 'Apply' afterwards to actually create it on sampler side. Создать новый посыл. Для действительного назначения посыла на стороне сэмплера надо будет нажать кнопку «Применить». Create Создать Schedules the selected FX send for deletion. You have to select 'Apply' afterwards to actually destroy it on sampler side. Добавить выбранный посыл эффектов в очередь на удаление Для действительного удаления посыла на стороне сэмплера надо будет нажать кнопку «Применить» Destroy Разрушить FX Send's Parameters Параметры посыла эффектов Send Depth MIDI Controller: Отправлять MIDI-контроллер Depth: Current Depth: Текущая глубина: % % Audio Routing Маршрутизация звука qsamplerChannelStrip Qsampler: Channel Qsampler: Канал Channel setup Настроить канал &Channel &Канал Alt+C Alt+к -- -- Instrument name Название инструмента MIDI port / channel Порт/канал MIDI -- / -- -- / -- Instrument load status Статус загрузки инструмента MIDI Activity Активность MIDI Channel mute Приглушить канал &Mute &Тихо Alt+M Alt+т Channel solo Солирование канала &Solo &Соло Alt+S Alt+с Channel volume Громкость канала % % Edit Channel's Effect Settings Изменить эффекты канала &FX &Эффекты Alt+F Alt+э Edit channel's instrument Изменить инструмент канала &Edit &Изменить Alt+E Alt+и Least buffer fill stream usage (%) Stream / Voice count Счетчик потоков/голосов --/-- --/-- qsamplerDeviceForm Qsampler: Devices Qsampler: Устройства Device list Список устройств Devices Устройства Device name Название устройства Dri&ver: &Драйвер: Driver type name Название типа драйвера Channel: Канал: Device port/channel Порт/канал устройства Refresh device list view Обновить список устройств &Refresh О&бновить Alt+R Alt+б Create device Создать устройство &Create &Создать Alt+C Alt+с Delete device Удалить устройство &Delete &Удалить Alt+D Alt+у Close this dialog Закрыть этот диалог Close &Закрыть qsamplerInstrumentForm Qsampler: MIDI Instrument Qsampler: Инструмент MIDI Engine name Название движка &Engine: &Движок: &Prog: &Программа: Program (0-127) Программа (0-127) Vol&ume: &Громкость: &Map: &Карта: &Bank: &Банк: Bank (0-16383) Банк (0-16383) Instrument filename Имя файла инструмента M&ode: &Режим: &Filename: Имя &файла: &Name: И&мя Instrument map Карта инструментов &Instrument: &Инструмент: Instrument name Название инструмента Volume (%) Громкость (%) % % Name Название Load mode Режим загрузки Default По умолчанию On Demand По требованию On Demand Hold Persistent Непрерывно Browse for instrument filename Указать файл инструмента O&K &OK Alt+K Alt+о C&ancel О&тменить Alt+A Alt+т qsamplerInstrumentListForm Qsampler: Instruments Qsampler: Инструменты &Context &Контекст New &Instrument... &Создать инструмент... New Создать Insert Вставить &Edit... &Изменить... Edit Изменить Enter Enter &Delete &Удалить Delete Удалить &Refresh О&бновить Refresh Обновить F5 F5 qsamplerMainForm MainWindow Основное окно &Edit &Правка &View &Вид MIDI Device Status Статус устройства MIDI &Channels &Каналы &Help &Справка &File &Файл Open &Recent Открыть &недавние &New &Создать New Создать New session Создать сеанс New sampler session Создать новый сеанс работы с сэмплером Ctrl+N Ctrl+N &Open... &Открыть... Open Открыть Open session Открыть сеанс Open sampler session Открыть сеанс работы с сэмплером Ctrl+O Ctrl+O &Save Со&хранить Save Сохранить Save session Сохранить сеанс Save sampler session Сохранить сеанс работы с сэмплером Ctrl+S Ctrl+S Save &As... Сохранить &как... Save As Сохранить как Save current sampler session with another name Сохранить активный сеанс под другим именем Rese&t С&бросить Reset Сбросить Reset instance Reset sampler instance Ctrl+R Ctrl+R &Restart &Перезагрузить Restart Перезагрузить Restart instance Перезагрузить движок Restart sampler instance Перезагрузить движок сэмплера Ctrl+Shift+R Ctrl+Shift+R E&xit В&ыход Exit Выйти Exit this application program Завершить работу с программой &Add Channel &Добавить канал Add Добавить Add channel Добавить канал Add a new sampler channel Добавить новый канал сэмплера Ctrl+A Ctrl+A &Remove Channel &Удалить канал Remove Удалить Remove channel Удалить канал Remove current sampler channel Удалить активный канал сэмплера Ctrl+X Ctrl+X Re&set Channel С&бросить канал Reset channel Сбросить канал Reset current sampler channel Сбросить активный канал сэмплера R&eset All Channels Сбросить &все каналы Reset All Сбросить все Reset all channels Сбросить все каналы Reset all sampler channels Сбросить все каналы сэмплера &Setup Channel... &Настроить канал... Setup Настроить Setup channel Настроить канал Setup current sampler channel Настроить активный канал сэмплера F2 F2 Ed&it Channel... &Изменить канал... Edit Изменить Edit channel Изменить канал Edit current sampler channel Изменить активный канал сэмплера F9 F9 &Menubar Строка &меню Menubar Строка меню Show/hide menubar Показать или скрыть строку меню Show/hide the main program window menubar Показать или скрыть строку меню основного окна программы Ctrl+M Ctrl+M &Toolbar &Панель инструментов viewToolbars Панель инструментов Show/hide toolbar Показать или скрыть панель инструментов Show/hide main program window toolbars Показать или скрыть панель инструментов основного окна программы Ctrl+T Ctrl+T &Statusbar &Строка состояния Statusbar Строка состояния Show/hide statusbar Показать или скрыть строку состояния Show/hide the main program window statusbar Показать или скрыть строку состояния основного окна программы M&essages Соо&бщения Messages Сообщения Show/hide messages Показать или скрыть диалог сообщений Show/hide the messages window Показать или скрыть окно диалога сообщений &Instruments &Инструменты Instruments Инструменты MIDI instruments configuration Настройка инструментов MIDI Show/hide the MIDI instruments configuration window Показать или скрыть окно настройки инструментов MIDI F10 F10 &Devices &Устройства Devices Устройства Device configuration Настройка устройств Show/hide the device configuration window Показать или скрыть окно настройки устройств F11 F11 &Options... &Параметры... Options Параметры General options Общие параметры Change general application program options Общие параметры работы программы F12 F12 &Arrange &Расставить Arrange Расставить Arrange channels Расставить каналы Line up all channel strips Расставить блоки каналов по вертикали F5 F5 A&uto Arrange &Автоматически расставлять Auto Arrange Автоматически расставлять Auto-arrange channels Автоматически расставлять каналы Auto-arrange channel strips Автоматически расставлять блоки каналов &About... &О программе... About О программе Show information about this application program Показать информацию о программе About &Qt... О &Qt... About Qt О Qt Show information about the Qt toolkit Показать информацию об инструментарии Qt qsamplerOptionsForm Qsampler: Options Параметры Qsampler OK OK Cancel Отменить &Server &Сервер Settings Параметры &Host: &Хост: LinuxSampler server listener port number Номер порта для LinuxSampler 8888 8888 &Port: &Порт: LinuxSampler server host name or address Название или адрес узла LinuxSampler localhost localhost &Command line: &Командная строка: Whether to start the LinuxSampler server on local machine Запускать ли сервер LinuxSampler на локальной машине &Start server locally &Запускать сервер локально Alt+S Alt+з Command line to start LinuxSampler server locally Команда локального запуска LinuxSampler linuxsampler linuxsampler Start &delay: З&адержка старта: Delay time in seconds after server startup Задержка в секундах перед стартом сервера secs с Receive timeout in milliseconds Время ожидания в миллисекундах msec мс &Timeout: &Время ожидания: Logging Ведение журнала Messages log file Файл с журналом сообщений LinuxSampler Browse for the messages log file location Указать расположение файла журнала ... ... Whether to activate a messages logging to file. Включать ли функцию ведения журнала в файле &Messages log file: &Файл с журналом: Alt+M Alt+ф &Tuning &Настройка Limits Пределы Maximum number of voices: Максимальное число голосов: Maximum number of voices Максимальное число голосов Maximum number of disk streams: Максимальное число дисковых потоков: Maximum number of disk streams Максимальное число дисковых потоков &Display &Интерфейс Channels Каналы Sample channel display font display Пример отображения шрифта в канале Select font for the channel display Выберите шрифт для отображения канала &Font... &Шрифт... Alt+F Alt+ш Whether to refresh the channels view automatically Обновлять ли втоматически вид каналов &Auto refresh: &Автообновление: Alt+A Alt+а Maximum &volume: Макс. &громкость: Time in milliseconds between each auto-refresh cycle Время между циклами автообновления в миллисекундах Upper limit for the sampler channel volume setting Верхний предел громкости каждого канала % % Whether to enable a shiny glass light effect on the channel display Показывать ли отблеск на «стекле» с индикаторами канала Display shiny glass light &effect Показывать отблеск на &дисплее канала Alt+E Alt+д Messages Сообщения Sample messages text font display Пример использования выбранного шрифта для сообщений Select font for the messages text display Выберите шрифт для вывода сообщений Whether to keep a maximum number of lines in the messages window Устанавливать ли максимальный предел строк в панели сообщений &Messages limit: П&редел строк сообщений: The maximum number of message lines to keep in view Максимальное количество видимых в панели сообщений lines строк Other Прочее Whether to ask for confirmation on removals Спрашивать подтверждение при удалении каналов &Confirm removals &Подтверждать удаление Alt+C Alt+п &Number of recent files: &Запоминаемых сеансов: The maximum number of recent files to keep in menu Максимальное число сеансов, перечисляемых как недавно открывавшихся Whether to keep all child windows on top of the main window Показывать ли все окна прграммы всегда над основным ее окном &Keep child windows always on top Окна &всегда наверху Alt+K Alt+в Whether to capture standard output (stdout/stderr) into messages window Захватывать ли стандартные потоки (stdout/stderr) в панель сообщений Capture standard &output Захватывать &системные потоки сообщений Alt+O Alt+с Whether to show the complete directory path of loaded session files Показывать ли расположение загруженного файла сеанса в файловой системе Show complete &path of session files По&казывать полный путь к файлам сеансов Alt+P Alt+к Whether to show the actual instrument names as read from instrument file (using libgig) Показывать ли названия инструментов, считанные из метаданных файлов (при помощи libgig) Show actual &instrument names Показывать названия инс&трументов Alt+I Alt+т &Base font size: К&егль шрифта в GUI: Base application font size (pt.) Кегль шрифта в интерфейсе (в пунктах) (default) (по умолчанию) 6 6 7 7 8 8 9 9 10 10 11 11 12 12 qsampler-0.2.2/qsampler.desktop.in0000644000175000017500000000043111123277123017040 0ustar alessioalessio[Desktop Entry] Name=Qsampler GenericName=LinuxSampler GUI Comment=Qsampler is a LinuxSampler Qt GUI Interface Exec=@ac_prefix@/bin/qsampler Icon=@ac_prefix@/share/pixmaps/qsampler.png Categories=Audio;AudioVideo;JACK;ALSA;Qt; Terminal=false Type=Application X-SuSE-translate=true qsampler-0.2.2/configure.ac0000644000175000017500000002706111235071265015515 0ustar alessioalessio# Process this file with autoconf to produce a configure script. AC_INIT(Qsampler, 0.2.2, rncbc@rncbc.org, qsampler) AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui) AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop) # Set default installation prefix. AC_PREFIX_DEFAULT(/usr/local) ac_prefix=$prefix if test "x$ac_prefix" = "xNONE"; then ac_prefix=$ac_default_prefix fi AC_SUBST(ac_prefix) AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) # Enable debugging argument option. AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), [ac_debug="$enableval"]) if test "x$ac_debug" = "xyes"; then AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) ac_debug="debug" else ac_debug="release" fi AC_SUBST(ac_debug) # Enable libgig availability. AC_ARG_ENABLE(libgig, AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), [ac_libgig="$enableval"], [ac_libgig="yes"]) # Standard installation base dirs. ac_with_paths="/usr /usr/local" # Some a-la-debian alternatives... for X in /usr/lib /usr/lib64 /usr/share; do for Y in qt qt4; do if test -d $X/$Y/bin; then ac_with_paths="$ac_with_paths $X/$Y" fi done done # Set for alternate Qt installation dir. AC_ARG_WITH(qt, AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), [ac_with_paths="$ac_with_paths $withval"]) # Set for alternate liblscp installation dir. AC_ARG_WITH(liblscp, AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), [ac_with_paths="$ac_with_paths $withval"]) # Set for alternate libgig installation dir. AC_ARG_WITH(libgig, AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), [ac_with_paths="$ac_with_paths $withval"]) # Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_GCC_TRADITIONAL # Checks for languages. AC_LANG_C AC_LANG_CPLUSPLUS # Prepend alternate dependencies paths. ac_path=$PATH for X in $ac_with_paths; do if test -d $X/bin; then ac_path="$X/bin:$ac_path" fi if test -x $X/qmake; then ac_path="$X:$ac_path" fi if test -d $X/include; then for Y in qt qt4; do if test -d $X/include/$Y; then CFLAGS="-I$X/include/$Y $CFLAGS" CPPFLAGS="-I$X/include/$Y $CPPFLAGS" ac_incpath="$X/include/$Y $ac_incpath" fi done CFLAGS="-I$X/include $CFLAGS" CPPFLAGS="-I$X/include $CPPFLAGS" ac_incpath="$X/include $ac_incpath" fi if test -d $X/lib64; then LIBS="-L$X/lib64 $LIBS" ac_libs="-L$X/lib64 $ac_libs" fi if test -d $X/lib; then LIBS="-L$X/lib $LIBS" ac_libs="-L$X/lib $ac_libs" fi done # Check for proper Qt version. AC_CACHE_CHECK([for Qt library version >= 4.1], ac_cv_qtversion, [ AC_TRY_LINK([#include "Qt/qglobal.h"], [ #if QT_VERSION < 0x040100 #error Qt library 4.1 or greater required. #endif ], ac_cv_qtversion="yes", [ echo "no; Qt 4.1 or greater is required" exit ]) ]) # A common error message: ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." # Check for Qt qmake utility. AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path) if test "x$ac_qmake" = "xno"; then AC_MSG_ERROR([qmake $ac_errmsg]) fi AC_SUBST(ac_qmake) # Check for Qt moc utility. AC_PATH_PROG(ac_moc, moc, [no], $ac_path) if test "x$ac_moc" = "xno"; then AC_MSG_ERROR([moc $ac_errmsg]) fi AC_SUBST(ac_moc) # Check for Qt uic utility. AC_PATH_PROG(ac_uic, uic, [no], $ac_path) if test "x$ac_uic" = "xno"; then AC_MSG_ERROR([uic $ac_errmsg]) fi AC_SUBST(ac_uic) # Check for Qt lupdate utility. AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) if test "x$ac_lupdate" = "xno"; then AC_MSG_ERROR([lupdate $ac_errmsg]) fi AC_SUBST(ac_lupdate) # Check for Qt lrelease utility. AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) if test "x$ac_release" = "xno"; then AC_MSG_ERROR([lrelease $ac_errmsg]) fi AC_SUBST(ac_lrelease) # Checks for libraries. AC_CHECK_LIB(m, main) AC_CHECK_LIB(X11, main) AC_CHECK_LIB(Xext, main) # Check for round math function. AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"]) if test "x$ac_round" = "xyes"; then AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) fi # Check for mandatory libraries. AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"]) if test "x$ac_liblscp" = "xno"; then AC_MSG_ERROR([LSCP library not found.]) fi ac_libs="$ac_libs -llscp" AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], ac_cv_instrument_name, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; info.instrument_name = 0; ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no") ]) ac_instrument_name=$ac_cv_instrument_name if test "x$ac_instrument_name" = "xyes"; then AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) fi AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], ac_cv_mute_solo, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; info.mute = 0; info.solo = 0; ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no") ]) ac_mute_solo=$ac_cv_mute_solo if test "x$ac_mute_solo" = "xyes"; then AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"]) fi if test "x$ac_mute_solo" = "xyes"; then AC_CHECK_LIB(lscp, lscp_set_channel_solo, [ac_mute_solo="yes"], [ac_mute_solo="no"]) fi if test "x$ac_mute_solo" = "xyes"; then AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.]) fi AC_CHECK_LIB(lscp, lscp_map_midi_instrument, [ac_midi_instrument="yes"], [ac_midi_instrument="no"]) if test "x$ac_midi_instrument" = "xyes"; then AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.]) fi AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"]) if test "x$ac_fxsend" = "xyes"; then AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], ac_cv_fxsend_level, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_fxsend_info_t info; info.level = 0.0f; ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no") ]) ac_fxsend_level=$ac_cv_fxsend_level if test "x$ac_fxsend_level" = "xyes"; then AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) fi AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"]) if test "x$ac_fxsend_rename" = "xyes"; then AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.]) fi fi AC_CACHE_CHECK([for audio_routing array type], ac_cv_audio_routing, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; char ch = info.audio_routing[0][0]; ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes") ]) ac_audio_routing=$ac_cv_audio_routing if test "x$ac_audio_routing" = "xyes"; then AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) fi AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"]) if test "x$ac_volume" = "xyes"; then AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.]) fi AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"]) if test "x$ac_edit_instrument" = "xyes"; then AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.]) fi AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], ac_cv_channel_midi_event, [ AC_TRY_COMPILE([ #include "lscp/client.h" #include "lscp/event.h" ], [ lscp_event_t ev; ev = LSCP_EVENT_CHANNEL_MIDI; ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no") ]) ac_channel_midi_event=$ac_cv_channel_midi_event if test "x$ac_channel_midi_event" = "xyes"; then AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) fi AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp], ac_cv_device_midi_event, [ AC_TRY_COMPILE([ #include "lscp/client.h" #include "lscp/event.h" ], [ lscp_event_t ev; ev = LSCP_EVENT_DEVICE_MIDI; ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no") ]) ac_device_midi_event=$ac_cv_device_midi_event if test "x$ac_device_midi_event" = "xyes"; then AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.]) fi AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"]) if test "x$ac_max_voices" = "xyes"; then AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.]) fi # Check for optional libraries. if test "x$ac_libgig" = "xyes"; then AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) if test "x$ac_libgig" = "xyes"; then AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) ac_libs="$ac_libs -lgig" AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig]) AC_LANG_SAVE AC_LANG_CPLUSPLUS CXXFLAGS="$ac_libs" AC_TRY_RUN([ #include #include int main() { gig::File file; file.SetAutoLoad(false); exit(0); } ], have_libgig_setautoload="yes", have_libgig_setautoload="no", have_libgig_setautoload="no" ) AC_LANG_RESTORE AC_MSG_RESULT([$have_libgig_setautoload]) if test "x$have_libgig_setautoload" = "xyes"; then AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) fi fi fi # Check for round math function. AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"]) if test "x$ac_round" = "xyes"; then AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) fi AC_SUBST(ac_libs) AC_SUBST(ac_incpath) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) if test "x$ac_lscp_h" = "xno"; then AC_MSG_ERROR([LSCP headers not found.]) fi # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST # Checks for library functions. AC_CHECK_FUNCS(system) # Finally produce a configure header file and the makefiles. AC_OUTPUT # make clean > /dev/null 2>&1 # Output summary message echo echo " $PACKAGE_NAME $PACKAGE_VERSION" echo echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" echo echo " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name" echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo" echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument" echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend" echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level" echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename" echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing" echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume" echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" if test "x$ac_libgig" = "xyes"; then echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" fi echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" echo echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" echo echo "Now type 'make', followed by 'make install' as root." echo