Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
osxmidi authored Aug 9, 2023
1 parent 8a6fe55 commit 5d7a7b5
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 353 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ VST_DIR = ./vst

BUILD_FLAGS = -fPIC -O2 -DLVRT -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' $(CXX_FLAGS)

BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN32 = -m32 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN32 = -m32 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows

LINK_FLAGS = $(LDFLAGS)

Expand All @@ -26,7 +26,7 @@ LINK_WINE32 = -m32 -L/opt/wine-stable/lib/wine -L/opt/wine-devel/lib/wine -L/opt

PATH_TO_FILE = /usr/include/bits

TARGETS = linvst.so lin-vst-servertrack.exe lin-vst-servertrack32.exe
TARGETS = linvst.so lin-vst-server.exe lin-vst-server32.exe

PATH := $(PATH):/opt/wine-stable/bin:/opt/wine-devel/bin:/opt/wine-staging/bin

Expand All @@ -38,14 +38,14 @@ all: $(TARGETS)
linvst.so: linvst.unix.o remotevstclient.unix.o remotepluginclient.unix.o paths.unix.o
$(CXX) $^ $(LINK_PLUGIN) -o $@

lin-vst-servertrack.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
lin-vst-server.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
$(WINECXX) $^ $(LINK_WINE) -o $@

ifneq ("$(wildcard $(PATH_TO_FILE))","")
lin-vst-servertrack32.exe: lin-vst-server.wine32.o remotepluginserver.wine32.o paths.wine32.o
lin-vst-server32.exe: lin-vst-server.wine32.o remotepluginserver.wine32.o paths.wine32.o
$(WINECXX) $^ $(LINK_WINE32) -o $@
else
lin-vst-servertrack32.exe:
lin-vst-server32.exe:
endif

# --------------------------------------------------------------
Expand Down Expand Up @@ -92,7 +92,7 @@ install:
install -d $(BIN_DIR)
install -d $(VST_DIR)
install -m 755 linvst.so $(VST_DIR)
install -m 755 lin-vst-servertrack.exe lin-vst-servertrack.exe.so $(BIN_DIR)
install -m 755 lin-vst-server.exe lin-vst-server.exe.so $(BIN_DIR)
ifneq ("$(wildcard $(PATH_TO_FILE))","")
install -m 755 lin-vst-servertrack32.exe lin-vst-servertrack32.exe.so $(BIN_DIR)
install -m 755 lin-vst-server32.exe lin-vst-server32.exe.so $(BIN_DIR)
endif
16 changes: 8 additions & 8 deletions Makefile-64-32bit
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ VST_DIR = ./vst

BUILD_FLAGS = -fPIC -O2 -DLVRT -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' $(CXX_FLAGS)

BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN32 = -m32 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN32 = -m32 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows

LINK_FLAGS = $(LDFLAGS)

Expand All @@ -26,7 +26,7 @@ LINK_WINE32 = -m32 -L/opt/wine-stable/lib/wine -L/opt/wine-devel/lib/wine -L/opt

PATH_TO_FILE = /usr/include/bits

TARGETS = linvst.so lin-vst-servertrack.exe lin-vst-servertrack32.exe
TARGETS = linvst.so lin-vst-server.exe lin-vst-server32.exe

PATH := $(PATH):/opt/wine-stable/bin:/opt/wine-devel/bin:/opt/wine-staging/bin

Expand All @@ -38,14 +38,14 @@ all: $(TARGETS)
linvst.so: linvst.unix.o remotevstclient.unix.o remotepluginclient.unix.o paths.unix.o
$(CXX) $^ $(LINK_PLUGIN) -o $@

lin-vst-servertrack.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
lin-vst-server.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
$(WINECXX) $^ $(LINK_WINE) -o $@

ifneq ("$(wildcard $(PATH_TO_FILE))","")
lin-vst-servertrack32.exe: lin-vst-server.wine32.o remotepluginserver.wine32.o paths.wine32.o
lin-vst-server32.exe: lin-vst-server.wine32.o remotepluginserver.wine32.o paths.wine32.o
$(WINECXX) $^ $(LINK_WINE32) -o $@
else
lin-vst-servertrack32.exe:
lin-vst-server32.exe:
endif

# --------------------------------------------------------------
Expand Down Expand Up @@ -92,7 +92,7 @@ install:
install -d $(BIN_DIR)
install -d $(VST_DIR)
install -m 755 linvst.so $(VST_DIR)
install -m 755 lin-vst-servertrack.exe lin-vst-servertrack.exe.so $(BIN_DIR)
install -m 755 lin-vst-server.exe lin-vst-server.exe.so $(BIN_DIR)
ifneq ("$(wildcard $(PATH_TO_FILE))","")
install -m 755 lin-vst-servertrack32.exe lin-vst-servertrack32.exe.so $(BIN_DIR)
install -m 755 lin-vst-server32.exe lin-vst-server32.exe.so $(BIN_DIR)
endif
8 changes: 4 additions & 4 deletions Makefile-64bitonly
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ VST_DIR = ./vst

BUILD_FLAGS = -fPIC -O2 -DLVRT -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' $(CXX_FLAGS)

BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows

LINK_FLAGS = $(LDFLAGS)

Expand All @@ -24,7 +24,7 @@ LINK_WINE = -L/opt/wine-stable/lib64/wine -L/opt/wine-devel/lib64/wine -L/opt/wi

PATH_TO_FILE = /usr/include/bits

TARGETS = linvst.so lin-vst-servertrack.exe
TARGETS = linvst.so lin-vst-server.exe

PATH := $(PATH):/opt/wine-stable/bin:/opt/wine-devel/bin:/opt/wine-staging/bin

Expand All @@ -36,7 +36,7 @@ all: $(TARGETS)
linvst.so: linvst.unix.o remotevstclient.unix.o remotepluginclient.unix.o paths.unix.o
$(CXX) $^ $(LINK_PLUGIN) -o $@

lin-vst-servertrack.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
lin-vst-server.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
$(WINECXX) $^ $(LINK_WINE) -o $@

# --------------------------------------------------------------
Expand Down Expand Up @@ -72,5 +72,5 @@ install:
install -d $(BIN_DIR)
install -d $(VST_DIR)
install -m 755 linvst.so $(VST_DIR)
install -m 755 lin-vst-servertrack.exe lin-vst-servertrack.exe.so $(BIN_DIR)
install -m 755 lin-vst-server.exe lin-vst-server.exe.so $(BIN_DIR)

2 changes: 1 addition & 1 deletion lin-vst-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline,
cerr << "Copyright (c) 2012-2013 Filipe Coelho" << endl;
cerr << "Copyright (c) 2010-2011 Kristian Amlie" << endl;
cerr << "Copyright (c) 2004-2006 Chris Cannam" << endl;
cerr << "LinVst version 4.7.8" << endl;
cerr << "LinVst version 4.9" << endl;

if (cmdline[0] == '\0') {
exit(0);
Expand Down
26 changes: 11 additions & 15 deletions linvst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,32 +452,28 @@ VST_EXPORT AEffect *VSTPluginMain(audioMasterCallback audioMaster) {
if (!audioMaster(0, audioMasterVersion, 0, 0, 0, 0))
return 0;

try {
// try {
plugin = new RemoteVSTClient(audioMaster);
} catch (std::string e) {
// } catch (std::string e) {
if(!plugin)
{
std::cerr << "Could not connect to Server" << std::endl;
errwin2();
if (plugin) {
plugin->m_runok = 1;
delete plugin;
}
return 0;
}
}

if (plugin->m_runok == 2) {
if (plugin->m_runok == 2) {
std::cerr << "LinVst Error: trying to load unnamed linvst.so" << std::endl;
if (plugin)
delete plugin;
delete plugin;
return 0;
}
}

if (plugin->m_runok == 1) {
std::cerr << "LinVst Error: lin-vst-server not found or vst dll load "
"timeout or LinVst version mismatch"
<< std::endl;
if (plugin->m_runok == 1) {
std::cerr << "LinVst Error: lin-vst-server not found or vst dll load timeout or LinVst version mismatch" << std::endl;
// errwin2();
if (plugin)
delete plugin;
delete plugin;
return 0;
}

Expand Down
20 changes: 14 additions & 6 deletions remotepluginclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,20 +642,26 @@ m_threadbreakexitembed(0),

sprintf(tmpFileBase, "/tmp/rplugin_shm_XXXXXX");
if (mkstemp(tmpFileBase) < 0) {
m_runok = 1;
cleanup();
throw((std::string)"Failed to obtain temporary filename");
return;
// throw((std::string)"Failed to obtain temporary filename");
}
m_shmFileName = strdup(tmpFileBase);

m_shmFd = open(m_shmFileName, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (m_shmFd < 0) {
cleanup();
throw((std::string)"Failed to open or create shared memory file");
m_runok = 1;
cleanup();
return;
// throw((std::string)"Failed to open or create shared memory file");
}

if (sizeShm()) {
m_runok = 1;
cleanup();
throw((std::string) "Failed to mmap shared memory file");
return;
// throw((std::string) "Failed to mmap shared memory file");
}
}

Expand Down Expand Up @@ -699,7 +705,7 @@ void RemotePluginClient::syncStartup() {
ptr = (int *)m_shm;

for (int i = 0; i < 400000; i++) {
if (*ptr == 478) {
if (*ptr == 490) {
startok = 1;
break;
}
Expand Down Expand Up @@ -766,8 +772,10 @@ void RemotePluginClient::syncStartup() {

if (pthread_create(&m_AMThread, NULL, RemotePluginClient::callAMThread,
this) != 0) {
m_runok = 1;
cleanup();
throw((std::string) "Failed to initialize thread");
return;
// throw((std::string) "Failed to initialize thread");
}

startok = 0;
Expand Down
2 changes: 1 addition & 1 deletion remotepluginserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ int chunkrem;

ptr = (int *)m_shm;

*ptr = 478;
*ptr = 490;

for (int i = 0; i < 400000; i++) {
if ((*ptr == 2) || (*ptr == 3)) {
Expand Down
Loading

0 comments on commit 5d7a7b5

Please sign in to comment.