Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Midi music #614

Merged
merged 10 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
unzip bass.zip
cp ./c/x64/bass.lib ./lib

# BASS MIDI
curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
unzip bassmidi.zip
cp ./c/x64/bassmidi.lib ./lib

# BASS Opus
curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
unzip bassopus.zip
Expand Down Expand Up @@ -77,6 +82,7 @@ jobs:
cp ../../msvc2017_64/plugins/imageformats/qapng.dll ./imageformats/
cp ../../discord-rpc/win64-dynamic/bin/discord-rpc.dll .
cp ../../x64/bass.dll .
cp ../../x64/bassmidi.dll .
cp ../../x64/bassopus.dll .

- name: Upload Artifact
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ jobs:
run: |
# Download
curl http://www.un4seen.com/files/bass24-linux.zip -o bass_linux.zip
curl http://www.un4seen.com/files/bassmidi24-linux.zip -o bassmidi_linux.zip
curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus_linux.zip
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
# Extract
unzip bass_linux.zip
unzip bassmidi_linux.zip
unzip bassopus_linux.zip
unzip discord_rpc_linux.zip
# Copy
cp x64/libbass.so lib
cp x64/libbassmidi.so lib
cp x64/libbassopus.so lib
cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so lib

Expand Down
16 changes: 11 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ build linux x86_64:
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
- unzip bass.zip
- unzip -o bass.zip
- cp x64/libbass.so ../lib
- curl http://www.un4seen.com/files/bassmidi24-linux.zip -o bassmidi.zip
- unzip -o bassmidi.zip
- cp x64/libbassmidi.so ../lib
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- unzip bassopus.zip
- unzip -o bassopus.zip
- cp x64/libbassopus.so ../lib
- cd ..

# Extract Discord RPC
- mkdir discord-rpc
- cd discord-rpc
- curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
- unzip discord_rpc_linux.zip
- unzip -o discord_rpc_linux.zip
- cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ../lib
- cd ..

Expand Down Expand Up @@ -99,10 +102,13 @@ build windows i686:
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24.zip -o bass.zip
- unzip bass.zip
- unzip -o bass.zip
- cp bass.dll ../lib
- curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
- unzip -o bassmidi.zip
- cp bassmidi.dll ../lib
- curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
- unzip bassopus.zip
- unzip -o bassopus.zip
- cp bassopus.dll ../lib
- cd ..

Expand Down
1 change: 1 addition & 0 deletions Attorney_Online.pro
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ contains(DEFINES, DISCORD) {
DEFINES += BASSAUDIO
LIBS += -lbass
LIBS += -lbassopus
LIBS += -lbassmidi

macx:LIBS += -framework CoreFoundation -framework Foundation -framework CoreServices

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ target_include_directories(Attorney_Online PRIVATE include)
find_package(Qt5 COMPONENTS Core Gui Network Widgets REQUIRED)
target_link_directories(Attorney_Online PRIVATE lib)
target_link_libraries(Attorney_Online PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets
bass bassopus discord-rpc)
bass bassmidi bassopus discord-rpc)
target_compile_definitions(Attorney_Online PRIVATE DISCORD)

# Subdirectories
Expand Down
1 change: 1 addition & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ aopacket.h
aosfxplayer.h
aotextarea.h
bass.h
bassmidi.h
bassopus.h
chatlogpiece.h
courtroom.h
Expand Down
2 changes: 2 additions & 0 deletions include/aoapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "discord_rich_presence.h"

#include "bass.h"
#include "bassmidi.h"
#include "bassopus.h"

#include <QApplication>
Expand Down Expand Up @@ -540,6 +541,7 @@ class AOApplication : public QApplication {

void initBASS();
static void load_bass_opus_plugin();
static void load_bass_midi_plugin();
static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data,
void *user);
static void doBASSreset();
Expand Down
1 change: 1 addition & 0 deletions include/aomusicplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "file_functions.h"

#include "bass.h"
#include "bassmidi.h"
#include "bassopus.h"

#include "aoapplication.h"
Expand Down
Loading