aboutsummaryrefslogtreecommitdiff
path: root/tests/tsoloud.nim
blob: 544c1afee8cb515945dd6fc8e98125fbe3392d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os, nimterop/[cimport, git]

gitPull("https://github.com/jarikomppa/soloud", "soloud", "include/*\nsrc/*\n")

cDebug()

const
  inc = "soloud/include"
  src = "soloud/src"

cIncludeDir(inc)

when defined(Linux):
  {.passL: "-lpthread".}
  cDefine("WITH_OSS")
  cCompile(src/"backend/oss/*.cpp")

when defined(Windows):
  {.passC: "-msse".}
  {.passL: "-lwinmm".}
  cDefine("WITH_WINMM")
  cCompile(src/"backend/winmm/*.cpp")

cCompile(src/"c_api/soloud_c.cpp")
cCompile(src/"core/*.cpp")
cCompile(src/"audiosource", "cpp")
cCompile(src/"audiosource", "c")
cCompile(src/"filter/*.cpp")

cImport(inc/"soloud_c.h")

var
  s = Soloud_create()

echo s.Soloud_init()

s.Soloud_destroy()