aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-01-24 23:09:16 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-01-24 23:09:16 +0800
commit003c637ef40e1826b7c829afbfba82ea028e21a5 (patch)
treec897f130bd1641f7922c6a476953e7645d60d581 /qmidiplayer-desktop
parent11bda15b5ecb608686718a8180ff33ff37c673f3 (diff)
downloadQMidiPlayer-003c637ef40e1826b7c829afbfba82ea028e21a5.tar.xz
Migrated to fluidsynth 2.x.
Moved to mxe for Windows build. Fixed default value for CC#8.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmidiplayer-desktop.pro6
-rw-r--r--qmidiplayer-desktop/qmpefxwindow.cpp20
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp6
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.cpp4
4 files changed, 16 insertions, 20 deletions
diff --git a/qmidiplayer-desktop/qmidiplayer-desktop.pro b/qmidiplayer-desktop/qmidiplayer-desktop.pro
index 9b0928c..d942f23 100644
--- a/qmidiplayer-desktop/qmidiplayer-desktop.pro
+++ b/qmidiplayer-desktop/qmidiplayer-desktop.pro
@@ -112,11 +112,7 @@ unix{
win32{
DEFINES += RT_MIDI_H=\\\"RtMidi.h\\\"
#change these before building...
- LIBS += e:/libs/fluidsynth/libfluidsynth.dll.a winmm.lib
- Release:LIBS += e:/libs/rtmidi/rtmidi.lib
- Debug:LIBS += e:/libs/rtmidi/rtmidid.lib
- INCLUDEPATH += e:/libs/fluidsynth/include
- INCLUDEPATH += e:/libs/rtmidi
+ LIBS += -lfluidsynth -lwinmm -lRtMidi
RC_FILE = qmidiplayer.rc
}
RESOURCES = resources.qrc
diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp
index 4c7d0c0..5602dd4 100644
--- a/qmidiplayer-desktop/qmpefxwindow.cpp
+++ b/qmidiplayer-desktop/qmpefxwindow.cpp
@@ -17,16 +17,16 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) :
QSettings *settings=qmpSettingsWindow::getSettingsIntf();
ui->cbEnabledC->setChecked(settings->value("Effects/ChorusEnabled",1).toInt());
ui->cbEnabledR->setChecked(settings->value("Effects/ReverbEnabled",1).toInt());
- rr=settings->value("Effects/ReverbRoom",FLUID_REVERB_DEFAULT_ROOMSIZE).toDouble();
- rd=settings->value("Effects/ReverbDamp",FLUID_REVERB_DEFAULT_DAMP).toDouble();
- rw=settings->value("Effects/ReverbWidth",FLUID_REVERB_DEFAULT_WIDTH).toDouble();
- rl=settings->value("Effects/ReverbLevel",FLUID_REVERB_DEFAULT_LEVEL).toDouble();
-
- cfb=settings->value("Effects/ChorusFeedbk",FLUID_CHORUS_DEFAULT_N).toInt();
- cl=settings->value("Effects/ChorusLevel",FLUID_CHORUS_DEFAULT_LEVEL).toDouble();
- cr=settings->value("Effects/ChorusRate",FLUID_CHORUS_DEFAULT_SPEED).toDouble();
- cd=settings->value("Effects/ChorusDepth",FLUID_CHORUS_DEFAULT_DEPTH).toDouble();
- ct=settings->value("Effects/ChorusType",FLUID_CHORUS_DEFAULT_TYPE).toInt();
+ rr=settings->value("Effects/ReverbRoom",0.2).toDouble();
+ rd=settings->value("Effects/ReverbDamp",0.0).toDouble();
+ rw=settings->value("Effects/ReverbWidth",0.5).toDouble();
+ rl=settings->value("Effects/ReverbLevel",0.9).toDouble();
+
+ cfb=settings->value("Effects/ChorusFeedbk",3).toInt();
+ cl=settings->value("Effects/ChorusLevel",2.0).toDouble();
+ cr=settings->value("Effects/ChorusRate",0.3).toDouble();
+ cd=settings->value("Effects/ChorusDepth",8.0).toDouble();
+ ct=settings->value("Effects/ChorusType",FLUID_CHORUS_MOD_SINE).toInt();
qmpMainWindow::getInstance()->registerFunctionality(
efxf=new qmpEfxFunc(this),
std::string("Effects"),
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index ea1db75..c83152c 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -15,7 +15,7 @@
#define setButtonHeight(x,h) {x->setMaximumHeight(h*(logicalDpiY()/96.));x->setMinimumHeight(h*(logicalDpiY()/96.));}
#define setButtonWidth(x,h) {x->setMaximumWidth(h*(logicalDpiY()/96.));x->setMinimumWidth(h*(logicalDpiY()/96.));}
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
char* wcsto8bit(const wchar_t* s)
{
int size=WideCharToMultiByte(CP_OEMCP,WC_NO_BEST_FIT_CHARS,s,-1,0,0,0,0);
@@ -276,7 +276,7 @@ void qmpMainWindow::switchTrack(QString s)
player->setWaitVoice(qmpSettingsWindow::getSettingsIntf()->value("Midi/WaitVoice",1).toInt());
playerTh=new std::thread(&CMidiPlayer::playerThread,player);
#ifdef _WIN32
- SetThreadPriority(playerTh->native_handle(),THREAD_PRIORITY_TIME_CRITICAL);
+ SetThreadPriority((void*)playerTh->native_handle(),THREAD_PRIORITY_TIME_CRITICAL);
#endif
st=std::chrono::steady_clock::now();offset=0;
timer->start(UPDATE_INTERVAL);
@@ -391,7 +391,7 @@ void qmpMainWindow::on_pbPlayPause_clicked()
player->setWaitVoice(qmpSettingsWindow::getSettingsIntf()->value("Midi/WaitVoice",1).toInt());
playerTh=new std::thread(&CMidiPlayer::playerThread,player);
#ifdef _WIN32
- SetThreadPriority(playerTh->native_handle(),THREAD_PRIORITY_TIME_CRITICAL);
+ SetThreadPriority((void*)playerTh->native_handle(),THREAD_PRIORITY_TIME_CRITICAL);
#endif
st=std::chrono::steady_clock::now();offset=0;
timer->start(UPDATE_INTERVAL);
diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp
index 0f5b66a..613a5db 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.cpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.cpp
@@ -11,7 +11,7 @@
QSettings* qmpSettingsWindow::settings=NULL;
QComboBox* qmpSettingsWindow::outwidget=NULL;
-void qmpFluidForEachOpt(void* data,char*,char* option)
+void qmpFluidForEachOpt(void* data,const char*,const char* option)
{
QComboBox *pcb=(QComboBox*)data;
pcb->addItem(option);
@@ -388,7 +388,7 @@ void qmpSettingsWindow::verifySF()
if(QMessageBox::question(QDesktopWidget().screen(curMonitor),//this,
tr("No soundfont loaded"),
tr("Internal fluidsynth was chosen as the default output but it has no soundfont set. "
- "Would you like to setup soundfonts now? After that you may have to reload the internal synth."))==QMessageBox::Yes)
+ "Would you like to setup soundfonts now? You may have to reload the internal synth afterwards."))==QMessageBox::Yes)
{
show();
ui->tabWidget->setCurrentWidget(ui->tab_3);