1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 EXPORTS.soundtouch += [
10 'soundtouch_config.h',
11 'SoundTouchFactory.h',
18 'FIFOSampleBuffer.cpp',
20 'InterpolateCubic.cpp',
21 'InterpolateLinear.cpp',
22 'InterpolateShannon.cpp',
25 'SoundTouchFactory.cpp',
29 if CONFIG['INTEL_ARCHITECTURE']:
30 if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
31 SOURCES += ['sse_optimized.cpp']
32 SOURCES['sse_optimized.cpp'].flags += CONFIG['SSE2_FLAGS']
34 SOURCES += ['mmx_optimized.cpp']
35 SOURCES['mmx_optimized.cpp'].flags += CONFIG['MMX_FLAGS']
37 if CONFIG['OS_ARCH'] != 'WINNT':
38 # GCC/Clang require permissions to be explicitly set for the soundtouch
40 CXXFLAGS += ['-include', SRCDIR + '/soundtouch_perms.h']
42 # Windows need alloca renamed to _alloca
43 DEFINES['alloca'] = '_alloca'
45 DEFINES['BUILDING_SOUNDTOUCH'] = 1
47 # We allow warnings for third-party code that can be updated from upstream.
48 AllowCompilerWarnings()
50 FINAL_LIBRARY = 'lgpllibs'
52 # Use abort() instead of exception in SoundTouch.
53 DEFINES['ST_NO_EXCEPTION_HANDLING'] = 1