|
Lines 290-314
Link Here
|
| 290 |
|
290 |
|
| 291 |
class FidLib(Dependence): |
291 |
class FidLib(Dependence): |
| 292 |
|
292 |
|
| 293 |
def sources(self, build): |
|
|
| 294 |
symbol = None |
| 295 |
if build.platform_is_windows: |
| 296 |
if build.toolchain_is_msvs: |
| 297 |
symbol = 'T_MSVC' |
| 298 |
elif build.crosscompile: |
| 299 |
# Not sure why, but fidlib won't build with mingw32msvc and |
| 300 |
# T_MINGW |
| 301 |
symbol = 'T_LINUX' |
| 302 |
elif build.toolchain_is_gnu: |
| 303 |
symbol = 'T_MINGW' |
| 304 |
else: |
| 305 |
symbol = 'T_LINUX' |
| 306 |
|
| 307 |
return [build.env.StaticObject('#lib/fidlib-0.9.10/fidlib.c', |
| 308 |
CPPDEFINES=symbol)] |
| 309 |
|
| 310 |
def configure(self, build, conf): |
293 |
def configure(self, build, conf): |
| 311 |
build.env.Append(CPPPATH='#lib/fidlib-0.9.10/') |
294 |
if not conf.CheckLib('fidlib'): |
|
|
295 |
raise Exception('Did not find fidlib library, exiting!') |
| 296 |
build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/fidlib']) |
| 312 |
|
297 |
|
| 313 |
class ReplayGain(Dependence): |
298 |
class ReplayGain(Dependence): |
| 314 |
|
299 |
|
|
Lines 319-325
Link Here
|
| 319 |
build.env.Append(CPPPATH="#lib/replaygain") |
304 |
build.env.Append(CPPPATH="#lib/replaygain") |
| 320 |
|
305 |
|
| 321 |
class SoundTouch(Dependence): |
306 |
class SoundTouch(Dependence): |
| 322 |
SOUNDTOUCH_PATH = 'soundtouch-1.6.0' |
|
|
| 323 |
|
307 |
|
| 324 |
def sse_enabled(self, build): |
308 |
def sse_enabled(self, build): |
| 325 |
optimize = int(util.get_flags(build.env, 'optimize', 1)) |
309 |
optimize = int(util.get_flags(build.env, 'optimize', 1)) |
|
Lines 328-357
Link Here
|
| 328 |
(build.toolchain_is_gnu and optimize > 1)) |
312 |
(build.toolchain_is_gnu and optimize > 1)) |
| 329 |
|
313 |
|
| 330 |
def sources(self, build): |
314 |
def sources(self, build): |
| 331 |
sources = ['engine/enginebufferscalest.cpp', |
315 |
return ['engine/enginebufferscalest.cpp'] |
| 332 |
'#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH, |
|
|
| 333 |
'#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH, |
| 334 |
'#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH, |
| 335 |
'#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH, |
| 336 |
'#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH, |
| 337 |
'#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH, |
| 338 |
'#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH, |
| 339 |
'#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH] |
| 340 |
|
| 341 |
# SoundTouch CPU optimizations are only for x86 |
| 342 |
# architectures. SoundTouch automatically ignores these files when it is |
| 343 |
# not being built for an architecture that supports them. |
| 344 |
cpu_detection = '#lib/%s/cpu_detect_x86_win.cpp' if build.toolchain_is_msvs else \ |
| 345 |
'#lib/%s/cpu_detect_x86_gcc.cpp' |
| 346 |
sources.append(cpu_detection % self.SOUNDTOUCH_PATH) |
| 347 |
|
| 348 |
# Check if the compiler has SSE extention enabled |
| 349 |
# Allways the case on x64 (core instructions) |
| 350 |
if self.sse_enabled(build): |
| 351 |
sources.extend( |
| 352 |
['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH, |
| 353 |
'#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH,]) |
| 354 |
return sources |
| 355 |
|
316 |
|
| 356 |
def configure(self, build, conf, env=None): |
317 |
def configure(self, build, conf, env=None): |
| 357 |
if env is None: |
318 |
if env is None: |
|
Lines 359-371
Link Here
|
| 359 |
if build.platform_is_windows: |
320 |
if build.platform_is_windows: |
| 360 |
# Regardless of the bitwidth, ST checks for WIN32 |
321 |
# Regardless of the bitwidth, ST checks for WIN32 |
| 361 |
env.Append(CPPDEFINES = 'WIN32') |
322 |
env.Append(CPPDEFINES = 'WIN32') |
| 362 |
env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH]) |
323 |
if not conf.CheckLib(['SoundTouch','libSoundTouch']): |
| 363 |
|
324 |
raise Exception('Did not find SoundTouch library, exiting!') |
| 364 |
# Check if the compiler has SSE extention enabled |
325 |
build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/soundtouch']) |
| 365 |
# Allways the case on x64 (core instructions) |
326 |
build.env.Append(LIBS='SoundTouch') |
| 366 |
optimize = int(util.get_flags(env, 'optimize', 1)) |
|
|
| 367 |
if self.sse_enabled(build): |
| 368 |
env.Append(CPPDEFINES='SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS') |
| 369 |
|
327 |
|
| 370 |
class TagLib(Dependence): |
328 |
class TagLib(Dependence): |
| 371 |
def configure(self, build, conf): |
329 |
def configure(self, build, conf): |