pan not working, can not pan an stereo track with openAl.
I will change to miniaudio, tag this before changes.
This commit is contained in:
parent
ba9fcfadeb
commit
78695b7976
11 changed files with 108 additions and 59 deletions
|
@ -1,23 +1,24 @@
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
Libre Media Server Audio - An Open source Media Server.
|
Libre Media Server Audio - An Open source Media Server for arts and performing.
|
||||||
(c) Santiago Noreña 2012-2024 <libremediaserver@criptomart.net>
|
(c) Santiago Noreña 2012-2024 <lms@criptomart.net>
|
||||||
Code: https://github.com/criptomart/lms
|
Code: https://git.criptomart.net/libremediaserver
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
Lbre Media Server ChangeLog
|
Lbre Media Server ChangeLog
|
||||||
|
|
||||||
*******************************************************************************
|
v 0.1.3 (28/05/2024)
|
||||||
|
|
||||||
v 0.1.3 (1/05/2024)
|
+ Ubuntu 22.04 jammy.
|
||||||
|
+ Use SFML as audio engine.
|
||||||
- Ubuntu 22.04 jammy
|
+ Qt 5.15.3.
|
||||||
- Use SFML as audio engine
|
+ pitch.
|
||||||
- Qt 5.15.3
|
+ loop.
|
||||||
- pan
|
- pan.
|
||||||
- pitch
|
- Show faders values.
|
||||||
- loop
|
--> Hacer UI por fader: mute/centrado, valor, visualizador:
|
||||||
- loop points
|
--> Hacer UI con la visualización de tiempos.
|
||||||
- play offset
|
- SettingsDialog.
|
||||||
|
- Load/save conf file.
|
||||||
|
|
||||||
v 0.1.2 (12/08/2015)
|
v 0.1.2 (12/08/2015)
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,6 @@ You should have received a copy of the GNU General Public License along with thi
|
||||||
0. Requisites
|
0. Requisites
|
||||||
- sudo apt-get install build-essential qmake-qt5 gcc g++ libtool libsfml-dev qtbase5-dev libqt5webkit5-dev qtwebengine5-dev
|
- sudo apt-get install build-essential qmake-qt5 gcc g++ libtool libsfml-dev qtbase5-dev libqt5webkit5-dev qtwebengine5-dev
|
||||||
- OLA https://www.openlighting.org/ola/linuxinstall/#Git
|
- OLA https://www.openlighting.org/ola/linuxinstall/#Git
|
||||||
-- ToDo: la instalación de OLA es un infierno, hay que empaquetarlo o mirar si hay alguna lib de sACN
|
|
||||||
|
|
||||||
https://github.com/ETCLabs/sACN
|
|
||||||
|
|
||||||
1. Compiles
|
1. Compiles
|
||||||
$ qmake -spec linux-g++ -o Makefile libremediaserver-audio.pro
|
$ qmake -spec linux-g++ -o Makefile libremediaserver-audio.pro
|
||||||
|
|
51
docs/roadmap.txt
Normal file
51
docs/roadmap.txt
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
*******************************************************************************
|
||||||
|
Libre Media Server Audio - An Open source Media Server for arts and performing.
|
||||||
|
(c) Santiago Noreña 2012-2024 <lms@criptomart.net>
|
||||||
|
Code: https://git.criptomart.net/libremediaserver
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
Libre Media Server Roadmap
|
||||||
|
(or a whislist...)
|
||||||
|
|
||||||
|
v 0.2.1
|
||||||
|
- skin, UI/UX
|
||||||
|
- live input.
|
||||||
|
|
||||||
|
v 0.2.0
|
||||||
|
- Use sACN directly.
|
||||||
|
+ la instalación de OLA es mediante compilación, el repo de paquetes no está actualizado, nada user-friendly.
|
||||||
|
+ hay que empaquetar OLA, incluirlo en el binario, o implementar sACN y linkarlo estáticamente.
|
||||||
|
+ https://github.com/ETCLabs/sACN
|
||||||
|
- Qt6.
|
||||||
|
- audio processing (eq, rev, compresor, ...).
|
||||||
|
- CIPT/MSex, send icons play-pause-stop.
|
||||||
|
- Rasp build.
|
||||||
|
- Octopus Sound Card support (6 outputs - 8 inputs).
|
||||||
|
|
||||||
|
v 1.5
|
||||||
|
- Select sound device output.
|
||||||
|
- Multi device output, router layers to devices and audio outputs.
|
||||||
|
- Jack/pipewire integration?
|
||||||
|
- Rose noise and sine generator in menu to test system.
|
||||||
|
- Play Mode:
|
||||||
|
- Play all medias found in folder consecutevily or random, with loop.
|
||||||
|
- Play all medias, consecutevily and random, with loop.
|
||||||
|
- mute/panic on layer.
|
||||||
|
- loop points.
|
||||||
|
- play offset. ¿stop offset?
|
||||||
|
- number of layers configured in conf file, up to 256.
|
||||||
|
- Dar la opción clickeando en el widget de tiempo de poner una cuenta atrás en vez de hacia delante.
|
||||||
|
- Master Layer:
|
||||||
|
- Mute.
|
||||||
|
- Pan.
|
||||||
|
- Keyboards strokes, select files from ui.
|
||||||
|
- LOGs y entrada de comandos.
|
||||||
|
- Bufgix: depurar errores cuando no carga la librería de medias, cambia el númmero de capas, cambia el universo, etc.
|
||||||
|
|
||||||
|
v 1.4
|
||||||
|
- pan.
|
||||||
|
- Show faders values.
|
||||||
|
--> Hacer UI por fader: mute/centrado, valor, visualizador:
|
||||||
|
--> Hacer UI con la visualización de tiempos.
|
||||||
|
- SettingsDialog.
|
||||||
|
- Load/save conf file.
|
|
@ -1,11 +0,0 @@
|
||||||
To Do:
|
|
||||||
|
|
||||||
1. Acabar SettingsDialog --> Hay que hacer una Qlist de layerSettingWidget (tiene un spinbox para universo y otro spinbox para los address. Si queremos interactuar directamente con los universos en vez de a través del patch de OLA habrá que cambiar el spinbox del universo por un ComboList con los distintos protocolos/dispositivos y luego un SpinBox para la configuración (NetId,...). De momento es más sencillo seguir como hasta ahora, pero hay que refactorizar la clase layerSettingWidget para permitir la ampliación en el futuro de forma sencilla. Esta clase será la que iteraccione directamente con Settings.
|
|
||||||
2. LOGs y entrada de comandos. Depurar esto y dejarlo definitivo.
|
|
||||||
3. Entry Point / Exit Point
|
|
||||||
4. Dar la opción clickeando en el widget de tiempo de poner una cuenta atrás en vez de hacia delante.
|
|
||||||
5. Mover el dmx receiving checkbox a las capas.
|
|
||||||
6. Mute global y por capas.
|
|
||||||
7. Pan global y por capas.
|
|
||||||
8. Pitch
|
|
||||||
9. Dos modos de reproducción: Loop y One Shot.
|
|
|
@ -1,8 +1,6 @@
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = libremediaserver-audio
|
TARGET = libremediaserver-audio
|
||||||
QT += webkitwidgets widgets
|
QT += webkitwidgets widgets
|
||||||
CONFIG += debug
|
|
||||||
DESTDIR =
|
|
||||||
HEADERS += src/libremediaserver-audio.h \
|
HEADERS += src/libremediaserver-audio.h \
|
||||||
src/medialibrary.h \
|
src/medialibrary.h \
|
||||||
src/olathread.h \
|
src/olathread.h \
|
||||||
|
@ -27,11 +25,15 @@ SOURCES += src/main.cpp \
|
||||||
FORMS += src/libremediaserver-audio.ui \
|
FORMS += src/libremediaserver-audio.ui \
|
||||||
src/settingsdialog.ui \
|
src/settingsdialog.ui \
|
||||||
src/layersettingswidget.ui
|
src/layersettingswidget.ui
|
||||||
LIBS += -lola -lolacommon -lsfml-audio -lsfml-system
|
LIBS += -lola -lolacommon
|
||||||
# -lcitp
|
# -lcitp
|
||||||
RESOURCES =
|
LIBS += -L$$PWD/SFML/lib/ -lsfml-audio -lsfml-system
|
||||||
|
INCLUDEPATH += $$PWD/SFML/include
|
||||||
|
DEPENDPATH += $$PWD/SFML/include
|
||||||
|
PRE_TARGETDEPS += $$PWD/SFML/lib/libsfml-audio.so $$PWD/SFML/lib/libsfml-system.so
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
LICENSE.txt \
|
LICENSE.txt \
|
||||||
docs/compiling.txt \
|
docs/compiling.txt \
|
||||||
docs/changelog.txt \
|
docs/changelog.txt \
|
||||||
docs/lms-audio.xlm
|
docs/lms-audio.xlm \
|
||||||
|
docs/roadmap.txt
|
||||||
|
|
|
@ -28,12 +28,12 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name):
|
||||||
// status->addWidget(m_receiveDMX);
|
// status->addWidget(m_receiveDMX);
|
||||||
status->addWidget(m_statusLabel);
|
status->addWidget(m_statusLabel);
|
||||||
status->addWidget(m_statusValue);
|
status->addWidget(m_statusValue);
|
||||||
|
m_loopCheck = new QCheckBox();
|
||||||
m_loopCheckLabel = new QLabel;
|
m_loopCheckLabel = new QLabel;
|
||||||
m_loopCheckLabel->setText("Loop");
|
m_loopCheckLabel->setText("Loop");
|
||||||
m_loopCheck = new QCheckBox();
|
|
||||||
connect(m_loopCheck, SIGNAL(stateChanged(int)), this, SLOT(loopChanged(int)));
|
connect(m_loopCheck, SIGNAL(stateChanged(int)), this, SLOT(loopChanged(int)));
|
||||||
status->addWidget(m_loopCheckLabel);
|
|
||||||
status->addWidget(m_loopCheck);
|
status->addWidget(m_loopCheck);
|
||||||
|
status->addWidget(m_loopCheckLabel);
|
||||||
layout->addLayout(status);
|
layout->addLayout(status);
|
||||||
|
|
||||||
QHBoxLayout *folderLoaded = new QHBoxLayout;
|
QHBoxLayout *folderLoaded = new QHBoxLayout;
|
||||||
|
@ -61,9 +61,14 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name):
|
||||||
m_volumeSlider->setMinimum(0);
|
m_volumeSlider->setMinimum(0);
|
||||||
m_volumeSlider->setMaximum(90);
|
m_volumeSlider->setMaximum(90);
|
||||||
m_volumeSlider->setSingleStep(1);
|
m_volumeSlider->setSingleStep(1);
|
||||||
connect(m_volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(volumeChanged(int)));
|
m_volumeIndicator = new QLabel;
|
||||||
volumeBox->addWidget(m_volumeLabel, 0, 0);
|
volumeBox->addWidget(m_volumeLabel, 0, 0);
|
||||||
volumeBox->addWidget(m_volumeSlider, 0, 1);
|
volumeBox->addWidget(m_volumeSlider, 0, 1);
|
||||||
|
volumeBox->addWidget(m_volumeIndicator, 0, 2);
|
||||||
|
connect(m_volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(volumeChanged(int)));
|
||||||
|
connect(m_volumeSlider, &QSlider::valueChanged, this, [=] () {
|
||||||
|
m_volumeIndicator->setText(QString::number(m_volumeSlider->value()));
|
||||||
|
});
|
||||||
m_panLabel = new QLabel;
|
m_panLabel = new QLabel;
|
||||||
m_panLabel->setText("Pan");
|
m_panLabel->setText("Pan");
|
||||||
m_panSlider = new QSlider(Qt::Horizontal);
|
m_panSlider = new QSlider(Qt::Horizontal);
|
||||||
|
@ -122,7 +127,7 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name):
|
||||||
this->setLayout(layout);
|
this->setLayout(layout);
|
||||||
|
|
||||||
connect(m_watchDMX, SIGNAL(timeout()),
|
connect(m_watchDMX, SIGNAL(timeout()),
|
||||||
this, SLOT(watchDMXExpired()));
|
this, SLOT(refreshGUI()));
|
||||||
m_watchDMX->start(100);
|
m_watchDMX->start(100);
|
||||||
|
|
||||||
m_music.setAttenuation(0);
|
m_music.setAttenuation(0);
|
||||||
|
@ -140,7 +145,16 @@ void AudioLayerWidget::volumeChanged(int value)
|
||||||
|
|
||||||
void AudioLayerWidget::panChanged(int value)
|
void AudioLayerWidget::panChanged(int value)
|
||||||
{
|
{
|
||||||
m_music.setPosition((value - 128) / 32.0, 0, 0);
|
m_music.setRelativeToListener(true);
|
||||||
|
sf::Vector3f pos = m_music.getPosition();
|
||||||
|
//m_music.setSpati(0, 0, 0);
|
||||||
|
qreal pan = (value - 128) / 64.0f;
|
||||||
|
qWarning("change pan %f", pan);
|
||||||
|
//m_music.setPosition(pan, 0.0, sqrtf(1.0 + pan*pan));
|
||||||
|
m_music.setPosition(pan, 0.0f, -1.0f);
|
||||||
|
//pos = m_music.getPosition();
|
||||||
|
qWarning("%f %f %f", pos.x, pos.y, pos.z);
|
||||||
|
qWarning("is rel %i", m_music.isRelativeToListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioLayerWidget::pitchChanged(int value)
|
void AudioLayerWidget::pitchChanged(int value)
|
||||||
|
@ -158,12 +172,13 @@ void AudioLayerWidget::setVol(qreal vol)
|
||||||
m_music.setVolume(vol);
|
m_music.setVolume(vol);
|
||||||
m_volumeSlider->blockSignals(true);
|
m_volumeSlider->blockSignals(true);
|
||||||
m_volumeSlider->setValue(vol);
|
m_volumeSlider->setValue(vol);
|
||||||
|
m_volumeIndicator->setText(QString::number(vol));
|
||||||
m_volumeSlider->blockSignals(false);
|
m_volumeSlider->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioLayerWidget::setPan(qreal pan)
|
void AudioLayerWidget::setPan(qreal pan)
|
||||||
{
|
{
|
||||||
m_music.setPosition(float((pan - 128) / 32.0), 0, 0);
|
this->panChanged(pan);
|
||||||
m_panSlider->blockSignals(true);
|
m_panSlider->blockSignals(true);
|
||||||
m_panSlider->setValue(pan);
|
m_panSlider->setValue(pan);
|
||||||
m_panSlider->blockSignals(false);
|
m_panSlider->blockSignals(false);
|
||||||
|
@ -238,7 +253,7 @@ void AudioLayerWidget::stop()
|
||||||
m_music.stop();
|
m_music.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioLayerWidget::watchDMXExpired() {
|
void AudioLayerWidget::refreshGUI() {
|
||||||
// m_receiveDMX->setChecked(false);
|
// m_receiveDMX->setChecked(false);
|
||||||
int progress;
|
int progress;
|
||||||
switch (m_music.getStatus()) {
|
switch (m_music.getStatus()) {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#ifndef AUDIOLAYERWIDGET_H
|
#ifndef AUDIOLAYERWIDGET_H
|
||||||
#define AUDIOLAYERWIDGET_H
|
#define AUDIOLAYERWIDGET_H
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <cmath>
|
||||||
|
|
||||||
|
#include <QByteArray>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
|
@ -12,8 +13,8 @@
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
|
||||||
#include "SFML/Audio.hpp"
|
#include <SFML/Audio.hpp>
|
||||||
#include "SFML/System.hpp"
|
#include <SFML/System.hpp>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@ private:
|
||||||
|
|
||||||
QLabel *m_volumeLabel;
|
QLabel *m_volumeLabel;
|
||||||
QSlider *m_volumeSlider;
|
QSlider *m_volumeSlider;
|
||||||
|
QLabel *m_volumeIndicator;
|
||||||
|
|
||||||
QLabel *m_panLabel;
|
QLabel *m_panLabel;
|
||||||
QSlider *m_panSlider;
|
QSlider *m_panSlider;
|
||||||
|
@ -144,7 +146,7 @@ private slots:
|
||||||
/**
|
/**
|
||||||
* @brief Update the variable elements in GUI
|
* @brief Update the variable elements in GUI
|
||||||
*/
|
*/
|
||||||
void watchDMXExpired();
|
void refreshGUI();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUDIOLAYERWIDGET_H
|
#endif // AUDIOLAYERWIDGET_H
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "olathread.h"
|
#include "olathread.h"
|
||||||
|
|
||||||
#include <ola/Callback.h>
|
|
||||||
|
|
||||||
olaThread::olaThread(QObject *parent)
|
olaThread::olaThread(QObject *parent)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +61,6 @@ void olaThread::stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void olaThread::NewDmx(const ola::client::DMXMetadata &data,
|
void olaThread::NewDmx(const ola::client::DMXMetadata &data,
|
||||||
const ola::DmxBuffer &buffer)
|
const ola::DmxBuffer &buffer)
|
||||||
{
|
{
|
||||||
|
@ -121,18 +119,12 @@ void olaThread::socketClosed()
|
||||||
m_client = NULL;
|
m_client = NULL;
|
||||||
m_clientWrapper = NULL;
|
m_clientWrapper = NULL;
|
||||||
|
|
||||||
// set up ola connection
|
// setup ola connection
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// register all universes
|
// register universes
|
||||||
registerUniverse();
|
registerUniverse();
|
||||||
|
|
||||||
// start the thread????
|
// start thread
|
||||||
run();
|
run();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
#ifndef OLATHREAD_H
|
#ifndef OLATHREAD_H
|
||||||
#define OLATHREAD_H
|
#define OLATHREAD_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <ola/DmxBuffer.h>
|
#include <ola/DmxBuffer.h>
|
||||||
#include <ola/Logging.h>
|
#include <ola/Logging.h>
|
||||||
#include <ola/OlaClientWrapper.h>
|
#include <ola/OlaClientWrapper.h>
|
||||||
#include <ola/client/OlaClient.h>
|
#include <ola/client/OlaClient.h>
|
||||||
#include <ola/DmxBuffer.h>
|
#include <ola/DmxBuffer.h>
|
||||||
#include <ola/client/ClientTypes.h>
|
#include <ola/client/ClientTypes.h>
|
||||||
|
#include <ola/Callback.h>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "dmxPersonality.h"
|
#include "dmxPersonality.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ void Settings::setPathMedia(QString path)
|
||||||
// - The number of sources/layers controlled by DMX
|
// - The number of sources/layers controlled by DMX
|
||||||
// - The first DMX channel of each source/layer
|
// - The first DMX channel of each source/layer
|
||||||
// - The universe to bind in OLA
|
// - The universe to bind in OLA
|
||||||
|
|
||||||
void Settings::readFromFile(QString file) {
|
void Settings::readFromFile(QString file) {
|
||||||
QFile* xmlFile = new QFile(file);
|
QFile* xmlFile = new QFile(file);
|
||||||
if (!xmlFile->open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (!xmlFile->open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ void SettingsDialog::changeMediaPath()
|
||||||
QString file = fileNames.at(0);
|
QString file = fileNames.at(0);
|
||||||
Settings::getInstance()->setPathMedia(file);
|
Settings::getInstance()->setPathMedia(file);
|
||||||
QString desc = tr("Media Path Changed to: %1").arg(file);
|
QString desc = tr("Media Path Changed to: %1").arg(file);
|
||||||
qDebug(desc.toLatin1().constData());
|
qDebug("%s", desc.toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::layersChanged(int val)
|
void SettingsDialog::layersChanged(int val)
|
||||||
|
|
Loading…
Add table
Reference in a new issue