filtros funcionando
This commit is contained in:
parent
f87c908d30
commit
3525133287
5 changed files with 195 additions and 57 deletions
|
|
@ -26,10 +26,11 @@ libreMediaServerAudio::libreMediaServerAudio()
|
|||
m_settings = Settings::getInstance();
|
||||
m_settings->readFile();
|
||||
m_ui = m_settings->getShowUi();
|
||||
m_layersQty = m_settings->getLayersNumber();
|
||||
m_dmxSettings = m_settings->getDmxSettings();
|
||||
m_mediaLibrary = new MediaLibrary;
|
||||
m_mediaLibrary->initMediaLibrary();
|
||||
for (int i = 0; i < MAX_LAYERS; i++) {
|
||||
for (uint i = 0; i < m_layersQty; i++) {
|
||||
m_currentMedia[i] = "";
|
||||
m_currentStatus[i] = Status::Iddle;
|
||||
#ifdef NOGUI
|
||||
|
|
@ -39,24 +40,24 @@ libreMediaServerAudio::libreMediaServerAudio()
|
|||
m_updateUi[i][3] = -1;
|
||||
#endif
|
||||
}
|
||||
m_ola = new olaThread(this, m_settings->getLayersNumber());
|
||||
Q_CHECK_PTR(m_ola);
|
||||
m_ola->blockSignals(true);
|
||||
m_ola->registerUniverse();
|
||||
if (!m_mae.startEngine()) {
|
||||
if (!m_mae.startEngine(m_layersQty)) {
|
||||
cout << "Can not start Audio Engine!" << endl;
|
||||
this->~libreMediaServerAudio();
|
||||
exit(-1);
|
||||
}
|
||||
uint *audioDevList = m_settings->getAudioDeviceId();
|
||||
if (!m_mae.startDevice(audioDevList, m_settings->getAudioDeviceQty())) {
|
||||
cout << "Can not start Audio Device!" << audioDevList << endl;
|
||||
this->~libreMediaServerAudio();
|
||||
exit(-1);
|
||||
}
|
||||
cout << "Core init Complete. Start reading DMX." << endl;
|
||||
m_ola->blockSignals(false);
|
||||
m_ola = new olaThread(this, m_layersQty);
|
||||
Q_CHECK_PTR(m_ola);
|
||||
m_ola->blockSignals(true);
|
||||
m_ola->registerUniverse();
|
||||
#ifdef NOGUI
|
||||
m_ola->start(QThread::TimeCriticalPriority );
|
||||
#endif
|
||||
m_ola->blockSignals(false);
|
||||
cout << "Core init Complete." << endl;
|
||||
}
|
||||
|
||||
libreMediaServerAudio::~libreMediaServerAudio()
|
||||
|
|
@ -74,7 +75,8 @@ void libreMediaServerAudio::loadMedia(int layer, int folder, int file)
|
|||
if (strcmp(mediaFile.toLatin1().constData(), m_currentMedia[layer].toLatin1().constData()) == 0)
|
||||
return;
|
||||
if (QFile::exists(mediaFile)){
|
||||
m_mae.loadMedia(layer, mediaFile.toLatin1().data(), m_dmxSettings.at(layer).audioDevice);
|
||||
m_mae.loadMedia(layer, mediaFile.toLatin1().data(),\
|
||||
m_dmxSettings.at(layer).audioDevice);
|
||||
m_currentMedia[layer] = mediaFile;
|
||||
#ifndef NOGUI
|
||||
if (m_ui)
|
||||
|
|
@ -138,6 +140,9 @@ void libreMediaServerAudio::dmxInput(int layer, int channel, int value)
|
|||
m_played.append(m_ola->getValue(layer, DMX_FILE));
|
||||
}
|
||||
#endif
|
||||
} else if (channel >= LOW_FREQ) {
|
||||
m_mae.filterParamChanged(layer, m_dmxSettings.at(layer).audioDevice, channel, value);
|
||||
|
||||
}
|
||||
}
|
||||
#ifndef NOGUI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue