Skip to content

Commit

Permalink
Working linux audio drivres
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed May 13, 2019
1 parent 3eca1fa commit 89295f4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ else:

opts.Add(EnumVariable("platform","Platform to build",detected_platform,("windows","osx","freedesktop")))
opts.Add(BoolVariable("enable_rtaudio","Use RtAudio as Sound Driver",True))
opts.Add(BoolVariable("use_jack","Use Jack with RtAudio",False))
opts.Add(BoolVariable("use_pulseaudio","Use Pulseaudio with RtAudio",True))
opts.Add(BoolVariable("use_alsa","Use Alsa with RtAudio",True))
opts.Add(BoolVariable("enable_vst2","Enable VST2",True))

opts.Update(env) # update environment
Expand All @@ -38,6 +41,19 @@ if (env["enable_rtaudio"]):
#env.Append(CXXFLAGS=["-D__WINDOWS_ASIO__"])
env.Append(LIBS=["dsound","mfplat","mfuuid","wmcodecdspuuid","ksuser"])

if (env["platform"]=="freedesktop"):

if (env["use_pulseaudio"]):
env.Append(CXXFLAGS=["-D__LINUX_PULSE__"])
env.ParseConfig("pkg-config libpulse --libs --cflags")
env.ParseConfig("pkg-config libpulse-simple --libs --cflags")
if (env["use_alsa"]):
env.Append(CXXFLAGS=["-D__LINUX_ALSA__"])
env.ParseConfig("pkg-config alsa --libs --cflags")
if (env["use_jack"]):
env.Append(CXXFLAGS=["-D__LINUX_JACK__"])
env.ParseConfig("pkg-config jack --libs --cflags")

if (env["platform"]=="windows"):
env.Append(CXXFLAGS=["-DWINDOWS_ENABLED"])
if (env["enable_vst2"]):
Expand Down

0 comments on commit 89295f4

Please sign in to comment.