This commit is contained in:
chayleaf 2023-03-10 02:23:12 +07:00
commit fbc16c4b0c
12 changed files with 2473 additions and 0 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
ignore/
run.sh
dlls/wine
*.so
*.o

119
bass/Makefile Normal file
View file

@ -0,0 +1,119 @@
### Generated by Winemaker 0.8.4
###
### Invocation command line was
### /nix/store/h62yj7gxhwx6z03ql7jh3wjgivz0jdxv-devshell-dir/bin/winemaker . --dll --nosource-fix -DMightNeedSomething --wine32
SRCDIR = .
SUBDIRS =
DLLS = bass.dll
LIBS =
EXES =
### Common settings
CEXTRA = -mno-cygwin \
-m32 -Wall
CXXEXTRA = -m32
RCEXTRA =
DEFINES = -DMightNeedSomething
INCLUDE_PATH = -I.
DLL_PATH =
DLL_IMPORTS =
LIBRARY_PATH_1 =
LIBRARIES =
### bass.dll sources and settings
bass_dll_MODULE = bass.dll
bass_dll_C_SRCS = bass_main.c
bass_dll_CXX_SRCS =
bass_dll_RC_SRCS =
bass_dll_LDFLAGS = -shared \
$(bass_dll_MODULE:.dll=.spec) \
-mno-cygwin \
-m32
bass_dll_ARFLAGS =
bass_dll_DLL_PATH =
bass_dll_DLLS = odbc32 \
ole32 \
oleaut32 \
winspool \
odbccp32
bass_dll_LIBRARY_PATH =
bass_dll_LIBRARIES = uuid bass
bass_dll_OBJS = $(bass_dll_C_SRCS:.c=.o) \
$(bass_dll_CXX_SRCS:.cpp=.o) \
$(bass_dll_RC_SRCS:.rc=.res)
### Global source lists
C_SRCS = $(bass_dll_C_SRCS)
CXX_SRCS = $(bass_dll_CXX_SRCS)
RC_SRCS = $(bass_dll_RC_SRCS)
### Tools
CC = winegcc
CXX = wineg++
RC = wrc
AR = ar
### Generic targets
all: $(SUBDIRS) $(DLLS:%=%.so) $(LIBS) $(EXES)
### Build rules
.PHONY: all clean dummy
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
# Implicit rules
.SUFFIXES: .cpp .cxx .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
.c.o:
$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.rc.res:
$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
# Rules for cleaning
CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
$(RM) $(DLLS:%=%.so) $(LIBS) $(EXES) $(EXES:%=%.so)
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
### Target specific build rules
DEFLIB = $(LIBRARY_PATH_1) $(LIBRARIES) $(DLL_PATH) $(DLL_IMPORTS:%=-l%)
$(bass_dll_MODULE).so: $(bass_dll_OBJS) $(bass_dll_MODULE:.dll=.spec)
$(CC) $(bass_dll_LDFLAGS) -o $@ $(bass_dll_OBJS) $(bass_dll_LIBRARY_PATH) $(bass_dll_DLL_PATH) $(DEFLIB) $(bass_dll_DLLS:%=-l%) $(bass_dll_LIBRARIES:%=-l%)

106
bass/bass.spec Normal file
View file

@ -0,0 +1,106 @@
# Generated from bass.dll by winedump
1 stdcall BASS_Apply3D() BASS_BASS_Apply3D
2 stdcall BASS_ChannelBytes2Seconds( long long ) BASS_BASS_ChannelBytes2Seconds
3 stdcall BASS_ChannelFlags( long long long ) BASS_BASS_ChannelFlags
4 stdcall BASS_ChannelGet3DAttributes( long ptr ptr ptr ptr ptr ptr ) BASS_BASS_ChannelGet3DAttributes
5 stdcall BASS_ChannelGet3DPosition( long ptr ptr ptr ) BASS_BASS_ChannelGet3DPosition
6 stdcall BASS_ChannelGetAttribute( long long ptr ) BASS_BASS_ChannelGetAttribute
7 stdcall BASS_ChannelGetAttributeEx( long long ptr long ) BASS_BASS_ChannelGetAttributeEx
8 stdcall BASS_ChannelGetData( long ptr long ) BASS_BASS_ChannelGetData
9 stdcall BASS_ChannelGetDevice( long ) BASS_BASS_ChannelGetDevice
10 stdcall BASS_ChannelGetInfo( long ptr ) BASS_BASS_ChannelGetInfo
11 stdcall BASS_ChannelGetLength( long long ) BASS_BASS_ChannelGetLength
12 stdcall BASS_ChannelGetLevel( long ) BASS_BASS_ChannelGetLevel
13 stdcall BASS_ChannelGetLevelEx( long ptr long long ) BASS_BASS_ChannelGetLevelEx
14 stdcall BASS_ChannelGetPosition( long long ) BASS_BASS_ChannelGetPosition
15 stdcall BASS_ChannelGetTags( long long ) BASS_BASS_ChannelGetTags
16 stdcall BASS_ChannelIsActive( long ) BASS_BASS_ChannelIsActive
17 stdcall BASS_ChannelIsSliding( long long ) BASS_BASS_ChannelIsSliding
18 stdcall BASS_ChannelLock( long long ) BASS_BASS_ChannelLock
19 stdcall BASS_ChannelPause( long ) BASS_BASS_ChannelPause
20 stdcall BASS_ChannelPlay( long long ) BASS_BASS_ChannelPlay
21 stdcall BASS_ChannelRemoveDSP( long ptr ) BASS_BASS_ChannelRemoveDSP
22 stdcall BASS_ChannelRemoveFX( long ptr ) BASS_BASS_ChannelRemoveFX
23 stdcall BASS_ChannelRemoveLink( long long ) BASS_BASS_ChannelRemoveLink
24 stdcall BASS_ChannelRemoveSync( long ptr ) BASS_BASS_ChannelRemoveSync
25 stdcall BASS_ChannelSeconds2Bytes( long double ) BASS_BASS_ChannelSeconds2Bytes
26 stdcall BASS_ChannelSet3DAttributes( long long long long long long long ) BASS_BASS_ChannelSet3DAttributes
27 stdcall BASS_ChannelSet3DPosition( long ptr ptr ptr ) BASS_BASS_ChannelSet3DPosition
28 stdcall BASS_ChannelSetAttribute( long long long ) BASS_BASS_ChannelSetAttribute
29 stdcall BASS_ChannelSetAttributeEx( long long ptr long ) BASS_BASS_ChannelSetAttributeEx
30 stdcall BASS_ChannelSetDSP( long ptr ptr long ) BASS_BASS_ChannelSetDSP
31 stdcall BASS_ChannelSetDevice( long long ) BASS_BASS_ChannelSetDevice
32 stdcall BASS_ChannelSetFX( long long long ) BASS_BASS_ChannelSetFX
33 stdcall BASS_ChannelSetLink( long long ) BASS_BASS_ChannelSetLink
34 stdcall BASS_ChannelSetPosition( long long long ) BASS_BASS_ChannelSetPosition
35 stdcall BASS_ChannelSetSync( long long long ptr ptr ) BASS_BASS_ChannelSetSync
36 stdcall BASS_ChannelSlideAttribute( long long long long ) BASS_BASS_ChannelSlideAttribute
37 stdcall BASS_ChannelStop( long ) BASS_BASS_ChannelStop
38 stdcall BASS_ChannelUpdate( long long ) BASS_BASS_ChannelUpdate
39 stdcall BASS_ErrorGetCode() BASS_BASS_ErrorGetCode
40 stdcall BASS_FXGetParameters( ptr ptr ) BASS_BASS_FXGetParameters
41 stdcall BASS_FXReset( long ) BASS_BASS_FXReset
42 stdcall BASS_FXSetParameters( ptr ptr ) BASS_BASS_FXSetParameters
43 stdcall BASS_FXSetPriority( ptr long ) BASS_BASS_FXSetPriority
44 stdcall BASS_Free() BASS_BASS_Free
45 stdcall BASS_Get3DFactors( ptr ptr ptr ) BASS_BASS_Get3DFactors
46 stdcall BASS_Get3DPosition( ptr ptr ptr ptr ) BASS_BASS_Get3DPosition
47 stdcall BASS_GetCPU() BASS_BASS_GetCPU
48 stdcall BASS_GetConfig( long ) BASS_BASS_GetConfig
49 stdcall BASS_GetConfigPtr( long ) BASS_BASS_GetConfigPtr
50 stdcall BASS_GetDSoundObject( long ) BASS_BASS_GetDSoundObject
51 stdcall BASS_GetDevice() BASS_BASS_GetDevice
52 stdcall BASS_GetDeviceInfo( long ptr ) BASS_BASS_GetDeviceInfo
53 stdcall BASS_GetEAXParameters( long long long long ) BASS_BASS_GetEAXParameters
54 stdcall BASS_GetInfo( ptr ) BASS_BASS_GetInfo
55 stdcall BASS_GetVersion() BASS_BASS_GetVersion
56 stdcall BASS_GetVolume() BASS_BASS_GetVolume
57 stdcall BASS_Init( long long long ptr ptr ) BASS_BASS_Init
58 stdcall BASS_IsStarted() BASS_BASS_IsStarted
59 stdcall BASS_MusicFree( ptr ) BASS_BASS_MusicFree
60 stdcall BASS_MusicLoad( long ptr long long long long ) BASS_BASS_MusicLoad
61 stdcall BASS_Pause() BASS_BASS_Pause
62 stdcall BASS_PluginFree( ptr ) BASS_BASS_PluginFree
63 stdcall BASS_PluginGetInfo( ptr ) BASS_BASS_PluginGetInfo
64 stdcall BASS_PluginLoad( str long ) BASS_BASS_PluginLoad
65 stdcall BASS_RecordFree() BASS_BASS_RecordFree
66 stdcall BASS_RecordGetDevice() BASS_BASS_RecordGetDevice
67 stdcall BASS_RecordGetDeviceInfo( long ptr ) BASS_BASS_RecordGetDeviceInfo
68 stdcall BASS_RecordGetInfo( ptr ) BASS_BASS_RecordGetInfo
69 stdcall BASS_RecordGetInput( long ptr ) BASS_BASS_RecordGetInput
70 stdcall BASS_RecordGetInputName( long ) BASS_BASS_RecordGetInputName
71 stdcall BASS_RecordInit( long ) BASS_BASS_RecordInit
72 stdcall BASS_RecordSetDevice( long ) BASS_BASS_RecordSetDevice
73 stdcall BASS_RecordSetInput( long long long ) BASS_BASS_RecordSetInput
74 stdcall BASS_RecordStart( long long long ptr ptr ) BASS_BASS_RecordStart
75 stdcall BASS_SampleCreate( long long long long long ) BASS_BASS_SampleCreate
76 stdcall BASS_SampleFree( ptr ) BASS_BASS_SampleFree
77 stdcall BASS_SampleGetChannel( ptr long ) BASS_BASS_SampleGetChannel
78 stdcall BASS_SampleGetChannels( ptr ptr ) BASS_BASS_SampleGetChannels
79 stdcall BASS_SampleGetData( ptr ptr ) BASS_BASS_SampleGetData
80 stdcall BASS_SampleGetInfo( ptr ptr ) BASS_BASS_SampleGetInfo
81 stdcall BASS_SampleLoad( long ptr long long long long ) BASS_BASS_SampleLoad
82 stdcall BASS_SampleSetData( ptr ptr ) BASS_BASS_SampleSetData
83 stdcall BASS_SampleSetInfo( ptr ptr ) BASS_BASS_SampleSetInfo
84 stdcall BASS_SampleStop( ptr ) BASS_BASS_SampleStop
85 stdcall BASS_Set3DFactors( long long long ) BASS_BASS_Set3DFactors
86 stdcall BASS_Set3DPosition( ptr ptr ptr ptr ) BASS_BASS_Set3DPosition
87 stdcall BASS_SetConfig( long long ) BASS_BASS_SetConfig
88 stdcall BASS_SetConfigPtr( long ptr ) BASS_BASS_SetConfigPtr
89 stdcall BASS_SetDevice( long ) BASS_BASS_SetDevice
90 stdcall BASS_SetEAXParameters( long long long long ) BASS_BASS_SetEAXParameters
91 stdcall BASS_SetVolume( long ) BASS_BASS_SetVolume
92 stdcall BASS_Start() BASS_BASS_Start
93 stdcall BASS_Stop() BASS_BASS_Stop
94 stdcall BASS_StreamCreate( long long long str ptr ) BASS_BASS_StreamCreate
95 stdcall BASS_StreamCreateFile( long ptr long long long ) BASS_BASS_StreamCreateFile
96 stdcall BASS_StreamCreateFileUser( long long ptr ptr ) BASS_BASS_StreamCreateFileUser
97 stdcall BASS_StreamCreateURL( str long long ptr ptr ) BASS_BASS_StreamCreateURL
98 stdcall BASS_StreamFree( str ) BASS_BASS_StreamFree
99 stdcall BASS_StreamGetFilePosition( str long ) BASS_BASS_StreamGetFilePosition
100 stdcall BASS_StreamPutData( str ptr long ) BASS_BASS_StreamPutData
101 stdcall BASS_StreamPutFileData( str ptr long ) BASS_BASS_StreamPutFileData
102 stdcall BASS_Update( long ) BASS_BASS_Update
103 stdcall wine_bass_user_data_remove_export( long long ) wine_bass_user_data_remove_ex
104 stdcall wine_bass_user_data_add_export( long long ptr ) wine_bass_user_data_add_ex

167
bass/bass_dll.h Normal file
View file

@ -0,0 +1,167 @@
/*
* bass.dll
*
*/
#ifndef __WINE_BASS_DLL_H
#define __WINE_BASS_DLL_H
#define WIN32_LEAN_AND_MEAN
#include "windef.h"
#include <windows.h>
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "winternl.h"
// to make the ABI compatible
#undef CALLBACK
#undef WINAPI
#define CALLBACK
#define WINAPI
#include "bass.h"
typedef QWORD WIN_QWORD;
typedef BASS_3DVECTOR WIN_BASS_3DVECTOR;
typedef HMUSIC WIN_HMUSIC;
typedef HSAMPLE WIN_HSAMPLE;
typedef HCHANNEL WIN_HCHANNEL;
typedef HSTREAM WIN_HSTREAM;
typedef HRECORD WIN_HRECORD;
typedef HSYNC WIN_HSYNC;
typedef HDSP WIN_HDSP;
typedef HFX WIN_HFX;
typedef HPLUGIN WIN_HPLUGIN;
typedef BASS_CHANNELINFO WIN_BASS_CHANNELINFO;
typedef BASS_DEVICEINFO WIN_BASS_DEVICEINFO;
typedef BASS_SAMPLE WIN_BASS_SAMPLE;
typedef BASS_INFO WIN_BASS_INFO;
typedef BASS_RECORDINFO WIN_BASS_RECORDINFO;
typedef BASS_PLUGININFO WIN_BASS_PLUGININFO;
#define WIN_CALLBACK __stdcall
typedef void (WIN_CALLBACK WIN_SYNCPROC)(WIN_HSYNC handle, DWORD channel, DWORD data, void *user);
typedef void (WIN_CALLBACK WIN_DSPPROC)(WIN_HDSP handle, DWORD channel, void *buffer, DWORD length, void *user);
typedef BOOL (WIN_CALLBACK WIN_RECORDPROC)(WIN_HRECORD handle, const void *buffer, DWORD length, void *user);
typedef DWORD (WIN_CALLBACK WIN_STREAMPROC)(WIN_HSTREAM handle, void *buffer, DWORD length, void *user);
typedef void (WIN_CALLBACK WIN_DOWNLOADPROC)(const void *buffer, DWORD length, void *user);
typedef void (WIN_CALLBACK WIN_FILECLOSEPROC)(void *user);
typedef WIN_QWORD (WIN_CALLBACK WIN_FILELENPROC)(void *user);
typedef DWORD (WIN_CALLBACK WIN_FILEREADPROC)(void *buffer, DWORD length, void *user);
typedef BOOL (WIN_CALLBACK WIN_FILESEEKPROC)(WIN_QWORD offset, void *user);
typedef struct {
WIN_FILECLOSEPROC *close;
WIN_FILELENPROC *length;
WIN_FILEREADPROC *read;
WIN_FILESEEKPROC *seek;
} WIN_BASS_FILEPROCS;
void __stdcall BASS_BASS_Apply3D(void);
double __stdcall BASS_BASS_ChannelBytes2Seconds(DWORD handle, WIN_QWORD pos);
DWORD __stdcall BASS_BASS_ChannelFlags(DWORD handle, DWORD flags, DWORD mask);
BOOL __stdcall BASS_BASS_ChannelGet3DAttributes(DWORD handle, DWORD * mode, float * min, float * max, DWORD * iangle, DWORD * oangle, float * outvol);
BOOL __stdcall BASS_BASS_ChannelGet3DPosition(DWORD handle, WIN_BASS_3DVECTOR * pos, WIN_BASS_3DVECTOR * orient, WIN_BASS_3DVECTOR * vel);
BOOL __stdcall BASS_BASS_ChannelGetAttribute(DWORD handle, DWORD attrib, float * value);
DWORD __stdcall BASS_BASS_ChannelGetAttributeEx(DWORD handle, DWORD attrib, void * value, DWORD size);
DWORD __stdcall BASS_BASS_ChannelGetData(DWORD handle, void * buffer, DWORD length);
DWORD __stdcall BASS_BASS_ChannelGetDevice(DWORD handle);
BOOL __stdcall BASS_BASS_ChannelGetInfo(DWORD handle, WIN_BASS_CHANNELINFO * info);
WIN_QWORD __stdcall BASS_BASS_ChannelGetLength(DWORD handle, DWORD mode);
DWORD __stdcall BASS_BASS_ChannelGetLevel(DWORD handle);
BOOL __stdcall BASS_BASS_ChannelGetLevelEx(DWORD handle, float * levels, float length, DWORD flags);
WIN_QWORD __stdcall BASS_BASS_ChannelGetPosition(DWORD handle, DWORD mode);
const char * __stdcall BASS_BASS_ChannelGetTags(DWORD handle, DWORD tags);
DWORD __stdcall BASS_BASS_ChannelIsActive(DWORD handle);
BOOL __stdcall BASS_BASS_ChannelIsSliding(DWORD handle, DWORD attrib);
BOOL __stdcall BASS_BASS_ChannelLock(DWORD handle, BOOL lock);
BOOL __stdcall BASS_BASS_ChannelPause(DWORD handle);
BOOL __stdcall BASS_BASS_ChannelPlay(DWORD handle, BOOL restart);
BOOL __stdcall BASS_BASS_ChannelRemoveDSP(DWORD handle, WIN_HDSP dsp);
BOOL __stdcall BASS_BASS_ChannelRemoveFX(DWORD handle, WIN_HFX fx);
BOOL __stdcall BASS_BASS_ChannelRemoveLink(DWORD handle, DWORD chan);
BOOL __stdcall BASS_BASS_ChannelRemoveSync(DWORD handle, WIN_HSYNC sync);
WIN_QWORD __stdcall BASS_BASS_ChannelSeconds2Bytes(DWORD handle, double pos);
BOOL __stdcall BASS_BASS_ChannelSet3DAttributes(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol);
BOOL __stdcall BASS_BASS_ChannelSet3DPosition(DWORD handle, WIN_BASS_3DVECTOR * pos, WIN_BASS_3DVECTOR * orient, WIN_BASS_3DVECTOR * vel);
BOOL __stdcall BASS_BASS_ChannelSetAttribute(DWORD handle, DWORD attrib, float value);
BOOL __stdcall BASS_BASS_ChannelSetAttributeEx(DWORD handle, DWORD attrib, void * value, DWORD size);
WIN_HDSP __stdcall BASS_BASS_ChannelSetDSP(DWORD handle, WIN_DSPPROC * proc, void * user, int priority);
BOOL __stdcall BASS_BASS_ChannelSetDevice(DWORD handle, DWORD device);
WIN_HFX __stdcall BASS_BASS_ChannelSetFX(DWORD handle, DWORD type, int priority);
BOOL __stdcall BASS_BASS_ChannelSetLink(DWORD handle, DWORD chan);
BOOL __stdcall BASS_BASS_ChannelSetPosition(DWORD handle, WIN_QWORD pos, DWORD mode);
WIN_HSYNC __stdcall BASS_BASS_ChannelSetSync(DWORD handle, DWORD type, WIN_QWORD param, WIN_SYNCPROC * proc, void * user);
BOOL __stdcall BASS_BASS_ChannelSlideAttribute(DWORD handle, DWORD attrib, float value, DWORD time);
BOOL __stdcall BASS_BASS_ChannelStop(DWORD handle);
BOOL __stdcall BASS_BASS_ChannelUpdate(DWORD handle, DWORD length);
int __stdcall BASS_BASS_ErrorGetCode(void);
BOOL __stdcall BASS_BASS_FXGetParameters(WIN_HFX handle, void * params);
BOOL __stdcall BASS_BASS_FXReset(DWORD handle);
BOOL __stdcall BASS_BASS_FXSetParameters(WIN_HFX handle, void * params);
BOOL __stdcall BASS_BASS_FXSetPriority(WIN_HFX handle, int priority);
BOOL __stdcall BASS_BASS_Free(void);
BOOL __stdcall BASS_BASS_Get3DFactors(float * distf, float * rollf, float * doppf);
BOOL __stdcall BASS_BASS_Get3DPosition(WIN_BASS_3DVECTOR * pos, WIN_BASS_3DVECTOR * vel, WIN_BASS_3DVECTOR * front, WIN_BASS_3DVECTOR * top);
float __stdcall BASS_BASS_GetCPU(void);
DWORD __stdcall BASS_BASS_GetConfig(DWORD option);
const void * __stdcall BASS_BASS_GetConfigPtr(DWORD option);
void * __stdcall BASS_BASS_GetDSoundObject(DWORD object);
DWORD __stdcall BASS_BASS_GetDevice(void);
BOOL __stdcall BASS_BASS_GetDeviceInfo(DWORD device, WIN_BASS_DEVICEINFO * info);
BOOL __stdcall BASS_BASS_GetEAXParameters(DWORD * env, float * vol, float * decay, float * damp);
BOOL __stdcall BASS_BASS_GetInfo(WIN_BASS_INFO * info);
DWORD __stdcall BASS_BASS_GetVersion(void);
float __stdcall BASS_BASS_GetVolume(void);
BOOL __stdcall BASS_BASS_Init(int device, DWORD freq, DWORD flags, HWND win, void * dsguid);
DWORD __stdcall BASS_BASS_IsStarted(void);
BOOL __stdcall BASS_BASS_MusicFree(WIN_HMUSIC handle);
WIN_HMUSIC __stdcall BASS_BASS_MusicLoad(BOOL mem, void * file, WIN_QWORD offset, DWORD length, DWORD flags, DWORD freq);
BOOL __stdcall BASS_BASS_Pause(void);
BOOL __stdcall BASS_BASS_PluginFree(WIN_HPLUGIN handle);
const WIN_BASS_PLUGININFO * __stdcall BASS_BASS_PluginGetInfo(WIN_HPLUGIN handle);
WIN_HPLUGIN __stdcall BASS_BASS_PluginLoad(char * file, DWORD flags);
BOOL __stdcall BASS_BASS_RecordFree(void);
DWORD __stdcall BASS_BASS_RecordGetDevice(void);
BOOL __stdcall BASS_BASS_RecordGetDeviceInfo(DWORD device, WIN_BASS_DEVICEINFO * info);
BOOL __stdcall BASS_BASS_RecordGetInfo(WIN_BASS_RECORDINFO * info);
DWORD __stdcall BASS_BASS_RecordGetInput(int input, float * volume);
const char * __stdcall BASS_BASS_RecordGetInputName(int input);
BOOL __stdcall BASS_BASS_RecordInit(int device);
BOOL __stdcall BASS_BASS_RecordSetDevice(DWORD device);
BOOL __stdcall BASS_BASS_RecordSetInput(int input, DWORD flags, float volume);
WIN_HRECORD __stdcall BASS_BASS_RecordStart(DWORD freq, DWORD chans, DWORD flags, WIN_RECORDPROC * proc, void * user);
WIN_HSAMPLE __stdcall BASS_BASS_SampleCreate(DWORD length, DWORD freq, DWORD chans, DWORD max, DWORD flags);
BOOL __stdcall BASS_BASS_SampleFree(WIN_HSAMPLE handle);
DWORD __stdcall BASS_BASS_SampleGetChannel(WIN_HSAMPLE handle, DWORD flags);
DWORD __stdcall BASS_BASS_SampleGetChannels(WIN_HSAMPLE handle, WIN_HCHANNEL * channels);
BOOL __stdcall BASS_BASS_SampleGetData(WIN_HSAMPLE handle, void * buffer);
BOOL __stdcall BASS_BASS_SampleGetInfo(WIN_HSAMPLE handle, WIN_BASS_SAMPLE * info);
WIN_HSAMPLE __stdcall BASS_BASS_SampleLoad(BOOL mem, void * file, WIN_QWORD offset, DWORD length, DWORD max, DWORD flags);
BOOL __stdcall BASS_BASS_SampleSetData(WIN_HSAMPLE handle, void * buffer);
BOOL __stdcall BASS_BASS_SampleSetInfo(WIN_HSAMPLE handle, WIN_BASS_SAMPLE * info);
BOOL __stdcall BASS_BASS_SampleStop(WIN_HSAMPLE handle);
BOOL __stdcall BASS_BASS_Set3DFactors(float distf, float rollf, float doppf);
BOOL __stdcall BASS_BASS_Set3DPosition(WIN_BASS_3DVECTOR * pos, WIN_BASS_3DVECTOR * vel, WIN_BASS_3DVECTOR * front, WIN_BASS_3DVECTOR * top);
BOOL __stdcall BASS_BASS_SetConfig(DWORD option, DWORD value);
BOOL __stdcall BASS_BASS_SetConfigPtr(DWORD option, void * value);
BOOL __stdcall BASS_BASS_SetDevice(DWORD device);
BOOL __stdcall BASS_BASS_SetEAXParameters(int env, float vol, float decay, float damp);
BOOL __stdcall BASS_BASS_SetVolume(float volume);
BOOL __stdcall BASS_BASS_Start(void);
BOOL __stdcall BASS_BASS_Stop(void);
WIN_HSTREAM __stdcall BASS_BASS_StreamCreate(DWORD freq, DWORD chans, DWORD flags, WIN_STREAMPROC * proc, void * user);
WIN_HSTREAM __stdcall BASS_BASS_StreamCreateFile(BOOL mem, void * file, WIN_QWORD offset, WIN_QWORD length, DWORD flags);
WIN_HSTREAM __stdcall BASS_BASS_StreamCreateFileUser(DWORD system, DWORD flags, WIN_BASS_FILEPROCS * proc, void * user);
WIN_HSTREAM __stdcall BASS_BASS_StreamCreateURL(char * url, DWORD offset, DWORD flags, WIN_DOWNLOADPROC * proc, void * user);
BOOL __stdcall BASS_BASS_StreamFree(WIN_HSTREAM handle);
WIN_QWORD __stdcall BASS_BASS_StreamGetFilePosition(WIN_HSTREAM handle, DWORD mode);
DWORD __stdcall BASS_BASS_StreamPutData(WIN_HSTREAM handle, void * buffer, DWORD length);
DWORD __stdcall BASS_BASS_StreamPutFileData(WIN_HSTREAM handle, void * buffer, DWORD length);
BOOL __stdcall BASS_BASS_Update(DWORD length);
/* __stdcall BASS__(); */
BOOL __stdcall wine_bass_user_data_add_ex(DWORD key, DWORD altKey, void *val);
void __stdcall wine_bass_user_data_remove_ex(DWORD key, DWORD altKey);
#endif /* __WINE_BASS_DLL_H */

1348
bass/bass_main.c Normal file

File diff suppressed because it is too large Load diff

119
bass_fx/Makefile Normal file
View file

@ -0,0 +1,119 @@
### Generated by Winemaker 0.8.4
###
### Invocation command line was
### /nix/store/dakf9ix1da5vpahzng6m5kjbs78ylp4i-devshell-dir/bin/winemaker . --dll --nosource-fix -DMightNeedSomething --wine32
SRCDIR = .
SUBDIRS =
DLLS = bass_fx.dll
LIBS =
EXES =
### Common settings
CEXTRA = -mno-cygwin \
-m32 -Wall
CXXEXTRA = -m32
RCEXTRA =
DEFINES = -DMightNeedSomething
INCLUDE_PATH = -I.
DLL_PATH =
DLL_IMPORTS =
LIBRARY_PATH_1 =
LIBRARIES =
### bass_fx.dll sources and settings
bass_fx_dll_MODULE = bass_fx.dll
bass_fx_dll_C_SRCS = bass_fx_main.c
bass_fx_dll_CXX_SRCS =
bass_fx_dll_RC_SRCS =
bass_fx_dll_LDFLAGS = -shared \
$(bass_fx_dll_MODULE:.dll=.spec) \
-mno-cygwin \
-m32
bass_fx_dll_ARFLAGS =
bass_fx_dll_DLL_PATH =
bass_fx_dll_DLLS = odbc32 \
ole32 \
oleaut32 \
winspool \
odbccp32
bass_fx_dll_LIBRARY_PATH=
bass_fx_dll_LIBRARIES = uuid bass_fx
bass_fx_dll_OBJS = $(bass_fx_dll_C_SRCS:.c=.o) \
$(bass_fx_dll_CXX_SRCS:.cpp=.o) \
$(bass_fx_dll_RC_SRCS:.rc=.res)
### Global source lists
C_SRCS = $(bass_fx_dll_C_SRCS)
CXX_SRCS = $(bass_fx_dll_CXX_SRCS)
RC_SRCS = $(bass_fx_dll_RC_SRCS)
### Tools
CC = winegcc
CXX = wineg++
RC = wrc
AR = ar
### Generic targets
all: $(SUBDIRS) $(DLLS:%=%.so) $(LIBS) $(EXES)
### Build rules
.PHONY: all clean dummy
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
# Implicit rules
.SUFFIXES: .cpp .cxx .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
.c.o:
$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.rc.res:
$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
# Rules for cleaning
CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
$(RM) $(DLLS:%=%.so) $(LIBS) $(EXES) $(EXES:%=%.so)
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
### Target specific build rules
DEFLIB = $(LIBRARY_PATH_1) $(LIBRARIES) $(DLL_PATH) $(DLL_IMPORTS:%=-l%)
$(bass_fx_dll_MODULE).so: $(bass_fx_dll_OBJS) $(bass_fx_dll_MODULE:.dll=.spec)
$(CC) $(bass_fx_dll_LDFLAGS) -o $@ $(bass_fx_dll_OBJS) $(bass_fx_dll_LIBRARY_PATH) $(bass_fx_dll_DLL_PATH) $(DEFLIB) $(bass_fx_dll_DLLS:%=-l%) $(bass_fx_dll_LIBRARIES:%=-l%)

19
bass_fx/bass_fx.spec Normal file
View file

@ -0,0 +1,19 @@
# Generated from bass_fx.dll by winedump
1 stdcall BASS_FX_BPM_BeatCallbackReset( long ) BASS_FX_BASS_FX_BPM_BeatCallbackReset
2 stdcall BASS_FX_BPM_BeatCallbackSet( long ptr ptr ) BASS_FX_BASS_FX_BPM_BeatCallbackSet
3 stdcall BASS_FX_BPM_BeatDecodeGet( long double double long ptr ptr ) BASS_FX_BASS_FX_BPM_BeatDecodeGet
4 stdcall BASS_FX_BPM_BeatFree( long ) BASS_FX_BASS_FX_BPM_BeatFree
5 stdcall BASS_FX_BPM_BeatGetParameters( long ptr ptr ptr ) BASS_FX_BASS_FX_BPM_BeatGetParameters
6 stdcall BASS_FX_BPM_BeatSetParameters( long long long long ) BASS_FX_BASS_FX_BPM_BeatSetParameters
7 stdcall BASS_FX_BPM_CallbackReset( long ) BASS_FX_BASS_FX_BPM_CallbackReset
8 stdcall BASS_FX_BPM_CallbackSet( long ptr double long long ptr ) BASS_FX_BASS_FX_BPM_CallbackSet
9 stdcall BASS_FX_BPM_DecodeGet( long double double long long ptr ptr ) BASS_FX_BASS_FX_BPM_DecodeGet
10 stdcall BASS_FX_BPM_Free( long ) BASS_FX_BASS_FX_BPM_Free
11 stdcall BASS_FX_BPM_Translate( long long long ) BASS_FX_BASS_FX_BPM_Translate
12 stdcall BASS_FX_GetVersion() BASS_FX_BASS_FX_GetVersion
13 stdcall BASS_FX_ReverseCreate( long long long ) BASS_FX_BASS_FX_ReverseCreate
14 stdcall BASS_FX_ReverseGetSource( str ) BASS_FX_BASS_FX_ReverseGetSource
15 stdcall BASS_FX_TempoCreate( long long ) BASS_FX_BASS_FX_TempoCreate
16 stdcall BASS_FX_TempoGetRateRatio( str ) BASS_FX_BASS_FX_TempoGetRateRatio
17 stdcall BASS_FX_TempoGetSource( str ) BASS_FX_BASS_FX_TempoGetSource

50
bass_fx/bass_fx_dll.h Normal file
View file

@ -0,0 +1,50 @@
/*
* bass_fx.dll
*
* Generated from bass_fx.dll by winedump.
*
* DO NOT SEND GENERATED DLLS FOR INCLUSION INTO WINE !
*
*/
#ifndef __WINE_BASS_FX_DLL_H
#define __WINE_BASS_FX_DLL_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#undef CALLBACK
#define CALLBACK
#undef WINAPI
#define WINAPI
#include "bass.h"
#include "bass_fx.h"
#define WIN_CALLBACK __stdcall
typedef void (WIN_CALLBACK WIN_BPMPROC)(DWORD chan, float bpm, void *user);
typedef void (WIN_CALLBACK WIN_BPMPROGRESSPROC)(DWORD chan, float percent, void *user);
typedef void (WIN_CALLBACK WIN_BPMBEATPROC)(DWORD chan, double beatpos, void *user);
typedef HSTREAM WIN_HSTREAM;
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatCallbackReset(DWORD handle);
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatCallbackSet(DWORD handle, WIN_BPMBEATPROC * proc, void * user);
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatDecodeGet(DWORD chan, double startSec, double endSec, DWORD flags, WIN_BPMBEATPROC * proc, void * user);
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatFree(DWORD handle);
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatGetParameters(DWORD handle, float * bandwidth, float * centerfreq, float * beat_rtime);
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatSetParameters(DWORD handle, float bandwidth, float centerfreq, float beat_rtime);
BOOL __stdcall BASS_FX_BASS_FX_BPM_CallbackReset(DWORD handle);
BOOL __stdcall BASS_FX_BASS_FX_BPM_CallbackSet(DWORD handle, WIN_BPMPROC * proc, double period, DWORD minMaxBPM, DWORD flags, void * user);
float __stdcall BASS_FX_BASS_FX_BPM_DecodeGet(DWORD chan, double startSec, double endSec, DWORD minMaxBPM, DWORD flags, WIN_BPMPROGRESSPROC * proc, void * user);
BOOL __stdcall BASS_FX_BASS_FX_BPM_Free(DWORD handle);
float __stdcall BASS_FX_BASS_FX_BPM_Translate(DWORD handle, float val2tran, DWORD trans);
DWORD __stdcall BASS_FX_BASS_FX_GetVersion(void);
WIN_HSTREAM __stdcall BASS_FX_BASS_FX_ReverseCreate(DWORD chan, float dec_block, DWORD flags);
DWORD __stdcall BASS_FX_BASS_FX_ReverseGetSource(WIN_HSTREAM chan);
WIN_HSTREAM __stdcall BASS_FX_BASS_FX_TempoCreate(DWORD chan, DWORD flags);
float __stdcall BASS_FX_BASS_FX_TempoGetRateRatio(WIN_HSTREAM chan);
DWORD __stdcall BASS_FX_BASS_FX_TempoGetSource(WIN_HSTREAM chan);
#endif /* __WINE_BASS_FX_DLL_H */

294
bass_fx/bass_fx_main.c Normal file
View file

@ -0,0 +1,294 @@
/*
* bass_fx.dll
*
*/
#include "bass_fx_dll.h"
#include <stdarg.h>
#include <stdlib.h>
#include <pthread.h>
// WINE_DEFAULT_DEBUG_CHANNEL(bassfx);
#define BASSFX_STRINGIFY(S) #S
#define BASSFX_RETURN(X) {\
return X; \
}
static char FILEBUFFFF[256];
static char ZEROOOOOO = '\n';
static pthread_mutex_t FILE_MUTEXX;
static FILE *filkdwkowee;
// from bass.dll.so
typedef BOOL (__stdcall *wine_bass_user_data_add_ex_t)(DWORD key, DWORD altKey, void *val);
typedef void (__stdcall *wine_bass_user_data_remove_ex_t)(DWORD key, DWORD altKey);
static pthread_mutex_t WINE_BASSFX_FNS;
static wine_bass_user_data_add_ex_t WINE_BASSFX_ADD_EX;
static wine_bass_user_data_remove_ex_t WINE_BASSFX_REMOVE_EX;
static inline wine_bass_user_data_add_ex_t wine_bass_user_data_add_ex_get() {
// this is a potential data race, but I don't care
if (WINE_BASSFX_ADD_EX) return WINE_BASSFX_ADD_EX;
// pthread_mutex_lock(&WINE_BASSFX_FNS);
HMODULE handle = GetModuleHandleA("bass.dll");
wine_bass_user_data_add_ex_t ret = NULL;
if (handle) {
void *tmp = GetProcAddress(handle, "wine_bass_user_data_add_export");
if (!tmp) tmp = GetProcAddress(handle, "wine_bass_user_data_add_ex");
ret = tmp;
}
WINE_BASSFX_ADD_EX = ret;
// pthread_mutex_unlock(&WINE_BASSFX_FNS);
return ret;
}
static inline BOOL wine_bass_user_data_add_ex_try(DWORD key, DWORD altKey, void *val) {
wine_bass_user_data_add_ex_t ptr = NULL;
ptr = wine_bass_user_data_add_ex_get();
if (!ptr) return FALSE;
return ptr(key, altKey, val);
}
static inline wine_bass_user_data_remove_ex_t wine_bass_user_data_remove_ex_get() {
if (WINE_BASSFX_REMOVE_EX) return WINE_BASSFX_REMOVE_EX;
// pthread_mutex_lock(&WINE_BASSFX_FNS);
HMODULE handle = GetModuleHandleA("bass.dll");
wine_bass_user_data_remove_ex_t ret = NULL;
if (handle) {
void *tmp = GetProcAddress(handle, "wine_bass_user_data_remove_export");
if (!tmp) tmp = GetProcAddress(handle, "wine_bass_user_data_remove_ex");
ret = tmp;
}
WINE_BASSFX_REMOVE_EX = ret;
// pthread_mutex_unlock(&WINE_BASSFX_FNS);
return ret;
}
void wine_bass_user_data_remove_ex_try(DWORD key, DWORD altKey) {
wine_bass_user_data_remove_ex_t ptr = NULL;
ptr = wine_bass_user_data_remove_ex_get();
if (ptr) return ptr(key, altKey);
}
/******************************************************************
* BASS_FX_BPM_BeatCallbackReset (BASS_FX.1)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatCallbackReset(DWORD handle) {
BASSFX_RETURN(BASS_FX_BPM_BeatCallbackReset(handle));
}
/******************************************************************
* BASS_FX_BPM_BeatCallbackSet (BASS_FX.2)
*
*
*/
typedef struct {
WIN_BPMBEATPROC *proc;
void *user;
} BpmBeatUserData;
void wine_bassfx_bpmbeatproc_wrapper(DWORD chan, double beatpos, void *user) {
BpmBeatUserData *user_new = user;
BASSFX_RETURN(user_new->proc(chan, beatpos, user_new->user));
}
void wine_bassfx_bpmbeatproc_wrapper_nouser(DWORD chan, double beatpos, void *user) {
WIN_BPMBEATPROC *proc = user;
BASSFX_RETURN(proc(chan, beatpos, NULL));
}
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatCallbackSet(DWORD handle, WIN_BPMBEATPROC * proc, void * user) {
if (user) {
BpmBeatUserData *user_new = malloc(sizeof(BpmBeatUserData));
user_new->proc = proc;
user_new->user = user;
BOOL ret = BASS_FX_BPM_BeatCallbackSet(handle, wine_bassfx_bpmbeatproc_wrapper, user_new);
if (ret) wine_bass_user_data_add_ex_try(handle, 0xB455F4, user_new);
else free(user_new);
return ret;
} else {
BASSFX_RETURN(BASS_FX_BPM_BeatCallbackSet(handle, wine_bassfx_bpmbeatproc_wrapper_nouser, proc));
}
}
/******************************************************************
* BASS_FX_BPM_BeatDecodeGet (BASS_FX.3)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatDecodeGet(DWORD chan, double startSec, double endSec, DWORD flags, WIN_BPMBEATPROC * proc, void * user) {
if (user) {
BpmBeatUserData *user_new = malloc(sizeof(BpmBeatUserData));
user_new->proc = proc;
user_new->user = user;
BOOL ret = BASS_FX_BPM_BeatDecodeGet(chan, startSec, endSec, flags, wine_bassfx_bpmbeatproc_wrapper, user_new);
if (ret) wine_bass_user_data_add_ex_try(chan, 0xB455F4, user_new);
else free(user_new);
return ret;
} else {
BASSFX_RETURN(BASS_FX_BPM_BeatDecodeGet(chan, startSec, endSec, flags, wine_bassfx_bpmbeatproc_wrapper_nouser, proc));
}
}
/******************************************************************
* BASS_FX_BPM_BeatFree (BASS_FX.4)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatFree(DWORD handle) {
wine_bass_user_data_remove_ex_try(handle, 0xB455F4);
BASSFX_RETURN(BASS_FX_BPM_BeatFree(handle));
}
/******************************************************************
* BASS_FX_BPM_BeatGetParameters (BASS_FX.5)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatGetParameters(DWORD handle, float * bandwidth, float * centerfreq, float * beat_rtime) {
BASSFX_RETURN(BASS_FX_BPM_BeatGetParameters(handle, bandwidth, centerfreq, beat_rtime));
}
/******************************************************************
* BASS_FX_BPM_BeatSetParameters (BASS_FX.6)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_BeatSetParameters(DWORD handle, float bandwidth, float centerfreq, float beat_rtime) {
BASSFX_RETURN(BASS_FX_BPM_BeatSetParameters(handle, bandwidth, centerfreq, beat_rtime));
}
/******************************************************************
* BASS_FX_BPM_CallbackReset (BASS_FX.7)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_CallbackReset(DWORD handle) {
BASSFX_RETURN(BASS_FX_BPM_CallbackReset(handle));
}
/******************************************************************
* BASS_FX_BPM_CallbackSet (BASS_FX.8)
*
*
*/
typedef struct {
WIN_BPMPROC *proc;
void *user;
} BpmUserData;
void wine_bassfx_bpmproc_wrapper(DWORD chan, float bpm, void *user) {
BpmUserData *user_new = user;
BASSFX_RETURN(user_new->proc(chan, bpm, user_new->user));
}
void wine_bassfx_bpmproc_wrapper_nouser(DWORD chan, float bpm, void *user) {
WIN_BPMPROC *proc = user;
BASSFX_RETURN(proc(chan, bpm, NULL));
}
BOOL __stdcall BASS_FX_BASS_FX_BPM_CallbackSet(DWORD handle, WIN_BPMPROC * proc, double period, DWORD minMaxBPM, DWORD flags, void * user) {
if (user) {
BpmUserData *user_new = malloc(sizeof(BpmUserData));
user_new->proc = proc;
user_new->user = user;
BOOL ret = BASS_FX_BPM_CallbackSet(handle, wine_bassfx_bpmproc_wrapper, period, minMaxBPM, flags, user_new);
if (ret) wine_bass_user_data_add_ex_try(handle, 0xB455F2, user_new);
else free(user_new);
return ret;
} else {
BASSFX_RETURN(BASS_FX_BPM_CallbackSet(handle, wine_bassfx_bpmproc_wrapper_nouser, period, minMaxBPM, flags, proc));
}
}
/******************************************************************
* BASS_FX_BPM_DecodeGet (BASS_FX.9)
*
*
*/
typedef struct {
WIN_BPMPROGRESSPROC *proc;
void *user;
} BpmProgressUserData;
void wine_bassfx_bpmprogressproc_wrapper(DWORD chan, float percent, void *user) {
BpmProgressUserData *user_new = user;
BASSFX_RETURN(user_new->proc(chan, percent, user_new->user));
}
void wine_bassfx_bpmprogressproc_wrapper_nouser(DWORD chan, float percent, void *user) {
WIN_BPMPROGRESSPROC *proc = user;
BASSFX_RETURN(proc(chan, percent, NULL));
}
float __stdcall BASS_FX_BASS_FX_BPM_DecodeGet(DWORD chan, double startSec, double endSec, DWORD minMaxBPM, DWORD flags, WIN_BPMPROGRESSPROC * proc, void * user) {
if (user) {
BpmProgressUserData *user_new = malloc(sizeof(BpmProgressUserData));
user_new->proc = proc;
user_new->user = user;
float ret = BASS_FX_BPM_DecodeGet(chan, startSec, endSec, minMaxBPM, flags, wine_bassfx_bpmprogressproc_wrapper, user_new);
if (ret > -0.1) wine_bass_user_data_add_ex_try(chan, 0xB455F2, user_new);
else free(user_new);
return ret;
} else {
BASSFX_RETURN(BASS_FX_BPM_DecodeGet(chan, startSec, endSec, minMaxBPM, flags, wine_bassfx_bpmprogressproc_wrapper_nouser, proc));
}
}
/******************************************************************
* BASS_FX_BPM_Free (BASS_FX.10)
*
*
*/
BOOL __stdcall BASS_FX_BASS_FX_BPM_Free(DWORD handle) {
wine_bass_user_data_remove_ex_try(handle, 0xB455F2);
BASSFX_RETURN(BASS_FX_BPM_Free(handle));
}
/******************************************************************
* BASS_FX_BPM_Translate (BASS_FX.11)
*
*
*/
float __stdcall BASS_FX_BASS_FX_BPM_Translate(DWORD handle, float val2tran, DWORD trans) {
BASSFX_RETURN(BASS_FX_BPM_Translate(handle, val2tran, trans));
}
/******************************************************************
* BASS_FX_GetVersion (BASS_FX.12)
*
*
*/
DWORD __stdcall BASS_FX_BASS_FX_GetVersion(void) {
BASSFX_RETURN(BASS_FX_GetVersion());
}
/******************************************************************
* BASS_FX_ReverseCreate (BASS_FX.13)
*
*
*/
WIN_HSTREAM __stdcall BASS_FX_BASS_FX_ReverseCreate(DWORD chan, float dec_block, DWORD flags) {
BASSFX_RETURN(BASS_FX_ReverseCreate(chan, dec_block, flags));
}
/******************************************************************
* BASS_FX_ReverseGetSource (BASS_FX.14)
*
*
*/
DWORD __stdcall BASS_FX_BASS_FX_ReverseGetSource(WIN_HSTREAM chan) {
BASSFX_RETURN(BASS_FX_ReverseGetSource(chan));
}
/******************************************************************
* BASS_FX_TempoCreate (BASS_FX.15)
*
*
*/
WIN_HSTREAM __stdcall BASS_FX_BASS_FX_TempoCreate(DWORD chan, DWORD flags) {
BASSFX_RETURN(BASS_FX_TempoCreate(chan, flags));
}
/******************************************************************
* BASS_FX_TempoGetRateRatio (BASS_FX.16)
*
*
*/
float __stdcall BASS_FX_BASS_FX_TempoGetRateRatio(WIN_HSTREAM chan) {
BASSFX_RETURN(BASS_FX_TempoGetRateRatio(chan));
}
/******************************************************************
* BASS_FX_TempoGetSource (BASS_FX.17)
*
*
*/
DWORD __stdcall BASS_FX_BASS_FX_TempoGetSource(WIN_HSTREAM chan) {
BASSFX_RETURN(BASS_FX_TempoGetSource(chan));
}

20
default.nix Normal file
View file

@ -0,0 +1,20 @@
{ lib
, waybar
, version
}:
waybar.overrideAttrs (prev: {
inherit version;
# version = "0.9.17";
src = lib.cleanSourceWith {
filter = name: type:
let
baseName = baseNameOf (toString name);
in
! (
lib.hasSuffix ".nix" baseName
);
src = lib.cleanSource ../.;
};
})

111
flake.lock Normal file
View file

@ -0,0 +1,111 @@
{
"nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1677856503,
"narHash": "sha256-TW8my47VpavO/PXA5hIumUcX80cj0AufojjUTdUonLw=",
"owner": "numtide",
"repo": "devshell",
"rev": "643d1857fea4e71e7f251cb574f59b1d63778085",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1677383253,
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1678293141,
"narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

115
flake.nix Normal file
View file

@ -0,0 +1,115 @@
{
description = "libbass for wine";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, flake-utils, devshell, nixpkgs, flake-compat }:
let
inherit (nixpkgs) lib;
in
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let attrs = {
overlays = [
(import "${devshell.outPath}/overlay.nix")
(_: prev: let
path = if prev.stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86";
in {
libbass = prev.libbass.overrideAttrs (_: {
version = "2.4.17";
src = prev.fetchurl {
url = "https://www.un4seen.com/files/bass24-linux.zip";
sha256 = "sha256-Ub6kLTJMUkIWiwUzRKZe1JRXFchPku2HReINsz0Wjvk=";
};
installPhase =
''
mkdir -p $out/{lib,include}
install -m644 -t $out/lib/ libs/${path}/libbass.so
install -m644 -t $out/include/ bass.h
'';
});
libbass_fx = prev.libbass_fx.overrideAttrs (_: {
version = "2.4.12.6";
src = prev.fetchurl {
url = "https://www.un4seen.com/files/z/0/bass_fx24-linux.zip";
sha256 = "sha256-Hul2ELwnaDV8TDRMDXoFisle31GATDkf3PdkR2K9QTs=";
};
installPhase = ''
mkdir -p $out/{lib,include}
install -m644 -t $out/lib/ libs/${path}/libbass_fx.so
install -m644 -t $out/include/ C/bass_fx.h
'';
});
})
];
config.allowBroken = true;
config.allowUnsupportedSystem = true;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"libbass"
"libbass_fx"
];
};
pkgs = import nixpkgs (attrs // {
inherit system;
});
pkgsX86 = import nixpkgs (attrs // {
system = "i686-linux";
});
in
pkgs.devshell.mkShell {
#commands = [
# {
# package = pkgs.devshell.cli;
# help = "Per project developer environments";
# }
#];
devshell.packages = with pkgs; [
gdb
gnumake
pkgsX86.gcc
pkgsX86.alsa-lib
pkgsX86.pipewire
pkgsX86.pulseaudio
pkgsX86.jack2
] ++ (map lib.getDev [
wineWowPackages.stagingFull
libbass
libbass_fx
]);
env = with pkgs; [
{ name = "WINEPREFIX"; eval = "~/wine/osu"; }
{ name = "WINE_DLL_PATH"; eval = "$PRJ_ROOT/dlls"; }
{ name = "WINEDLLPATH"; eval = "$PRJ_ROOT/dlls"; }
{ name = "C_INCLUDE_PATH"; prefix = "$DEVSHELL_DIR/include"; }
{ name = "C_INCLUDE_PATH"; prefix = "$DEVSHELL_DIR/include/wine/windows"; }
{ name = "CPLUS_INCLUDE_PATH"; prefix = "$DEVSHELL_DIR/include"; }
{ name = "CPLUS_INCLUDE_PATH"; prefix = "$DEVSHELL_DIR/include/wine/windows"; }
{ name = "PKG_CONFIG_PATH"; prefix = "$DEVSHELL_DIR/lib/pkgconfig"; }
{ name = "PKG_CONFIG_PATH"; prefix = "$DEVSHELL_DIR/share/pkgconfig"; }
# { name = "LIBRARY_PATH"; prefix = "${lib.getLib libbass}/lib"; }
# { name = "LIBRARY_PATH"; prefix = "${lib.getLib libbass_fx}/lib"; }
# { name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib libbass}/lib"; }
# { name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib libbass_fx}/lib"; }
{ name = "LIBRARY_PATH"; prefix = "${lib.getLib libbass}/lib"; }
{ name = "LIBRARY_PATH"; prefix = "${lib.getLib libbass_fx}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib libbass}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib libbass_fx}/lib"; }
{ name = "LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.libbass}/lib"; }
{ name = "LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.libbass_fx}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.libbass}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.libbass_fx}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.alsa-lib}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.pipewire}/lib"; }
{ name = "LD_LIBRARY_PATH"; prefix = "${lib.getLib pkgsX86.pulseaudio}/lib"; }
];
};
});
}