@@ -22,10 +22,12 @@ opts.Add(EnumVariable("platform","Platform to build",detected_platform,("windows
2222opts .Add (BoolVariable ("enable_rtaudio" ,"Use RtAudio as Sound Driver" ,True ))
2323opts .Add (BoolVariable ("use_jack" ,"Use Jack with RtAudio" ,False ))
2424opts .Add (BoolVariable ("use_pulseaudio" ,"Use Pulseaudio with RtAudio" ,True ))
25- opts .Add (BoolVariable ("use_alsa" ,"Use Alsa with RtAudio" ,True ))
25+ opts .Add (BoolVariable ("use_alsa" ,"Use Alsa with RtAudio and RtMidi " ,True ))
2626opts .Add (BoolVariable ("enable_vst2" ,"Enable VST2" ,True ))
2727opts .Add (BoolVariable ("use_wasapi" ,"Enable Wasapi" ,True ))
2828opts .Add (BoolVariable ("use_directsound" ,"Enable Wasapi" ,True ))
29+ opts .Add (BoolVariable ("enable_rtmidi" ,"Use RtMidi as MIDI Driver" ,True ))
30+ opts .Add (BoolVariable ("use_winmm" ,"Enable WinMM for RtMidi" ,True ))
2931
3032opts .Update (env ) # update environment
3133Help (opts .GenerateHelpText (env )) # generate help
@@ -37,36 +39,40 @@ if (detected_platform==""):
3739if (env ["enable_rtaudio" ]):
3840
3941 env .Append (CXXFLAGS = ["-DRTAUDIO_ENABLED" ])
40- if (env ["platform" ]== "windows" ):
41- if (env ["use_wasapi" ]):
42- env .Append (CXXFLAGS = ["-D__WINDOWS_WASAPI__" ])
43- if (env ["use_directsound" ]):
44- env .Append (CXXFLAGS = ["-D__WINDOWS_DS__" ])
45- #env.Append(CXXFLAGS=["-D__WINDOWS_ASIO__"])
46- env .Append (LIBS = ["dsound" ,"mfplat" ,"mfuuid" ,"wmcodecdspuuid" ,"ksuser" ])
47-
48- if (env ["platform" ]== "freedesktop" ):
49-
50- if (env ["use_pulseaudio" ]):
51- env .Append (CXXFLAGS = ["-D__LINUX_PULSE__" ])
52- env .ParseConfig ("pkg-config libpulse --libs --cflags" )
53- env .ParseConfig ("pkg-config libpulse-simple --libs --cflags" )
54- if (env ["use_alsa" ]):
55- env .Append (CXXFLAGS = ["-D__LINUX_ALSA__" ])
56- env .ParseConfig ("pkg-config alsa --libs --cflags" )
57- if (env ["use_jack" ]):
58- env .Append (CXXFLAGS = ["-D__LINUX_JACK__" ])
59- env .ParseConfig ("pkg-config jack --libs --cflags" )
42+
43+ if (env ["enable_rtmidi" ]):
44+
45+ env .Append (CXXFLAGS = ["-DRTMIDI_ENABLED" ])
46+
6047
6148if (env ["platform" ]== "windows" ):
6249 env .Append (CXXFLAGS = ["-DWINDOWS_ENABLED" ])
6350 if (env ["enable_vst2" ]):
6451 env .Append (CXXFLAGS = ["-DVST2_ENABLED" ])
52+ if (env ["use_wasapi" ]):
53+ env .Append (CXXFLAGS = ["-D__WINDOWS_WASAPI__" ])
54+ if (env ["use_directsound" ]):
55+ env .Append (CXXFLAGS = ["-D__WINDOWS_DS__" ])
56+ if (env ["use_winmm" ]):
57+ env .Append (CXXFLAGS = ["-D__WINDOWS_MM__" ])
58+
59+ #env.Append(CXXFLAGS=["-D__WINDOWS_ASIO__"])
60+ env .Append (LIBS = ["dsound" ,"mfplat" ,"mfuuid" ,"wmcodecdspuuid" ,"ksuser" ])
6561
6662
6763if (env ["platform" ]== "freedesktop" ):
6864 env ["enable_vst2" ]= False # not supported
6965 env .Append (CXXFLAGS = ["-DFREEDESKTOP_ENABLED" ])
66+ if (env ["use_pulseaudio" ]):
67+ env .Append (CXXFLAGS = ["-D__LINUX_PULSE__" ])
68+ env .ParseConfig ("pkg-config libpulse --libs --cflags" )
69+ env .ParseConfig ("pkg-config libpulse-simple --libs --cflags" )
70+ if (env ["use_alsa" ]):
71+ env .Append (CXXFLAGS = ["-D__LINUX_ALSA__" ])
72+ env .ParseConfig ("pkg-config alsa --libs --cflags" )
73+ if (env ["use_jack" ]):
74+ env .Append (CXXFLAGS = ["-D__LINUX_JACK__" ])
75+ env .ParseConfig ("pkg-config jack --libs --cflags" )
7076
7177def add_sources (self , sources , filetype , lib_env = None , shared = False ):
7278 import glob ;
0 commit comments