diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/aoapplication.cpp | 8 | ||||
| -rw-r--r-- | src/aomusicplayer.cpp | 14 | ||||
| -rw-r--r-- | src/text_file_functions.cpp | 2 |
3 files changed, 4 insertions, 20 deletions
diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index f3260ed2..7a8e4ea3 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -7,10 +7,9 @@ #include "options.h" #include "widgets/aooptionsdialog.h" -#include <bassmidi.h> - static QtMessageHandler original_message_handler; static AOApplication *message_handler_context; + void message_handler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { Q_EMIT message_handler_context->qt_log_message(type, context, msg); @@ -221,33 +220,28 @@ void AOApplication::initBASS() BASS_Init(static_cast<int>(a), 48000, BASS_DEVICE_LATENCY, nullptr, nullptr); load_bass_plugins(); qInfo() << info.name << "was set as the default audio output device."; - BASS_SetConfigPtr(BASS_CONFIG_MIDI_DEFFONT, QString(get_base_path() + "soundfont.sf2").toStdString().c_str()); return; } } BASS_Init(-1, 48000, BASS_DEVICE_LATENCY, nullptr, nullptr); load_bass_plugins(); } - BASS_SetConfigPtr(BASS_CONFIG_MIDI_DEFFONT, QString(get_base_path() + "soundfont.sf2").toStdString().c_str()); } #if (defined(_WIN32) || defined(_WIN64)) void AOApplication::load_bass_plugins() { BASS_PluginLoad("bassopus.dll", 0); - BASS_PluginLoad("bassmidi.dll", 0); } #elif defined __APPLE__ void AOApplication::load_bass_plugins() { BASS_PluginLoad("libbassopus.dylib", 0); - BASS_PluginLoad("libbassmidi.dylib", 0); } #elif (defined(LINUX) || defined(__linux__)) void AOApplication::load_bass_plugins() { BASS_PluginLoad("libbassopus.so", 0); - BASS_PluginLoad("libbassmidi.so", 0); } #else #error This operating system is unsupported for BASS plugins. diff --git a/src/aomusicplayer.cpp b/src/aomusicplayer.cpp index 4265a463..c4a562cb 100644 --- a/src/aomusicplayer.cpp +++ b/src/aomusicplayer.cpp @@ -35,7 +35,7 @@ QString AOMusicPlayer::playStream(QString song, int streamId, bool loopEnabled, } QString f_path = song; - DWORD newstream; + HSTREAM newstream; if (f_path.startsWith("http")) { if (!Options::getInstance().streamingEnabled()) @@ -51,17 +51,7 @@ QString AOMusicPlayer::playStream(QString song, int streamId, bool loopEnabled, flags |= BASS_STREAM_PRESCAN | BASS_UNICODE | BASS_ASYNCFILE; f_path = ao_app->get_real_path(ao_app->get_music_path(song)); - - QString extension = f_path.split('.').last(); - static const QStringList VALID_EXTENSION_LIST{"mo3", "xm", "mod", "s3m", "it", "mtm", "umx"}; - if (VALID_EXTENSION_LIST.contains(extension, Qt::CaseInsensitive)) - { - newstream = BASS_MusicLoad(FALSE, f_path.utf16(), 0, 0, flags, 1); - } - else - { - newstream = BASS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, flags); - } + newstream = BASS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, flags); } int error = BASS_ErrorGetCode(); diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 35efe20c..763efb58 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -360,7 +360,7 @@ QString AOApplication::get_court_sfx(QString p_identifier, QString p_misc) QString AOApplication::get_sfx_suffix(VPath sound_to_check) { - QStringList suffixes = {".opus", ".ogg", ".mp3", ".wav", ".mid", ".midi", ".xm", ".it", ".s3m", ".mod", ".mtm", ".umx"}; + QStringList suffixes = {".opus", ".ogg", ".mp3", ".wav"}; // Check if we were provided a direct filepath with a suffix already QString path = sound_to_check.toQString(); // Loop through our suffixes |
