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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
--- build/depends.py.orig 2010-12-22 11:13:22.000000000 -0800
+++ build/depends.py 2010-12-22 11:33:29.000000000 -0800
@@ -234,60 +234,16 @@
build.env.Append(CPPPATH="#lib/replaygain")
class SoundTouch(Dependence):
- SOUNDTOUCH_PATH = 'soundtouch-1.5.0'
def sources(self, build):
- sources = ['engine/enginebufferscalest.cpp',
- '#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH]
- if build.platform_is_windows and build.toolchain_is_msvs:
- if build.machine_is_64bit:
- sources.append(
- '#lib/%s/cpu_detect_x64_win.cpp' % self.SOUNDTOUCH_PATH)
- elif build.machine == 'x86':
- sources.append(
- '#lib/%s/cpu_detect_x86_win.cpp' % self.SOUNDTOUCH_PATH)
- else:
- raise Exception("Unhandled CPU configuration for SoundTouch")
- elif build.toolchain_is_gnu:
- if build.machine == 'x86_64':
- sources.append(
- '#lib/%s/cpu_detect_x64_gcc.cpp' % self.SOUNDTOUCH_PATH)
- else:
- sources.append(
- '#lib/%s/cpu_detect_x86_gcc.cpp' % self.SOUNDTOUCH_PATH)
- else:
- raise Exception("Unhandled CPU configuration for SoundTouch")
-
- # TODO(XXX) when we figure out a better way to represent features, fix
- # this.
- optimize = int(util.get_flags(build.env, 'optimize', 1))
- if build.machine_is_64bit or \
- (build.toolchain_is_msvs and optimize > 1) or \
- (build.toolchain_is_gnu and optimize > 2):
- sources.extend(
- ['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH,
- '#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH,
- ])
- if build.toolchain_is_msvs and not build.machine_is_64bit:
- sources.append('#lib/%s/3dnow_win.cpp' % self.SOUNDTOUCH_PATH)
- else:
- # TODO(XXX) the docs refer to a 3dnow_gcc, but we don't seem to have
- # it.
- pass
-
+ sources = ['engine/enginebufferscalest.cpp']
return sources
def configure(self, build, conf):
- if build.platform_is_windows:
- build.env.Append(CPPDEFINES = 'WIN%s' % build.bitwidth)
- build.env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH])
+ if not conf.CheckLib(['SoundTouch','libSoundTouch']):
+ raise Exception('Did not find libSoundTouch.a, libSoundTouch.lib, or the libSoundTouch development header files - exiting!')
+ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix', '/usr/local') + '/include/soundtouch'])
+ build.env.Append(LIBS='SoundTouch')
# TODO(XXX) when we figure out a better way to represent features, fix
# this.
|