mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1176300 - Move libsoundtouch to lgpllibs; r=glandium
This commit is contained in:
parent
ebbf0bdfe8
commit
ac8b78175b
@ -15,7 +15,6 @@
|
||||
#include "mozilla/Snprintf.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "soundtouch/SoundTouch.h"
|
||||
#include "Latency.h"
|
||||
#include "CubebUtils.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
@ -15,10 +15,7 @@
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "CubebUtils.h"
|
||||
|
||||
namespace soundtouch {
|
||||
class SoundTouch;
|
||||
}
|
||||
#include "soundtouch/SoundTouch.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -14,3 +14,7 @@ FAIL_ON_WARNINGS = True
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'lgpllibs',
|
||||
]
|
||||
|
@ -56,7 +56,7 @@ diff -u /src/cpu_detect_x86.cpp /src/cpu_detect_x86.cpp
|
||||
diff -u /src/STTypes.h /src/STTypes.h
|
||||
--- /src/STTypes.h
|
||||
+++ /src/STTypes.h
|
||||
@@ -54,12 +54,17 @@
|
||||
@@ -54,12 +54,13 @@
|
||||
#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
|
||||
|
||||
|
||||
@ -67,27 +67,14 @@ diff -u /src/STTypes.h /src/STTypes.h
|
||||
-#endif
|
||||
+#include "soundtouch_config.h"
|
||||
|
||||
+#if defined(WIN32) && defined(GKMEDIAS_SHARED_LIBRARY)
|
||||
+#ifdef BUILDING_SOUNDTOUCH
|
||||
+#if defined(WIN32)
|
||||
+#define EXPORT __declspec(dllexport)
|
||||
+#else
|
||||
+#define EXPORT __declspec(dllimport)
|
||||
+#endif
|
||||
+#else
|
||||
+#define EXPORT
|
||||
+#endif
|
||||
|
||||
namespace soundtouch
|
||||
{
|
||||
@@ -164,7 +169,7 @@
|
||||
};
|
||||
|
||||
// define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
|
||||
-// #define ST_NO_EXCEPTION_HANDLING 1
|
||||
+#define ST_NO_EXCEPTION_HANDLING 1
|
||||
#ifdef ST_NO_EXCEPTION_HANDLING
|
||||
// Exceptions disabled. Throw asserts instead if enabled.
|
||||
#include <assert.h>
|
||||
diff -u /src/SoundTouch.h /src/SoundTouch.h
|
||||
--- /src/SoundTouch.h
|
||||
+++ /src/SoundTouch.h
|
||||
@ -103,18 +90,6 @@ diff -u /src/SoundTouch.h /src/SoundTouch.h
|
||||
diff -u /src/FIRFilter.cpp /src/FIRFilter.cpp
|
||||
--- /src/FIRFilter.cpp
|
||||
+++ /src/FIRFilter.cpp
|
||||
@@ -46,6 +46,11 @@
|
||||
#include "FIRFilter.h"
|
||||
#include "cpu_detect.h"
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#include <malloc.h>
|
||||
+#define alloca _alloca
|
||||
+#endif
|
||||
+
|
||||
using namespace soundtouch;
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -291,9 +296,11 @@
|
||||
|
||||
FIRFilter * FIRFilter::newInstance()
|
||||
@ -143,17 +118,3 @@ diff -u /src/TDStretch.cpp /src/TDStretch.cpp
|
||||
// Check if MMX/SSE instruction set extensions supported by CPU
|
||||
|
||||
diff -u /src/SoundTouch.cpp /src/SoundTouch.cpp
|
||||
--- /src/SoundTouch.cpp
|
||||
+++ /src/SoundTouch.cpp
|
||||
@@ -80,6 +80,11 @@
|
||||
#include "RateTransposer.h"
|
||||
#include "cpu_detect.h"
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#include <malloc.h>
|
||||
+#define alloca _alloca
|
||||
+#endif
|
||||
+
|
||||
using namespace soundtouch;
|
||||
|
||||
/// test if two floating point numbers are equal
|
||||
|
@ -32,12 +32,15 @@ if CONFIG['INTEL_ARCHITECTURE']:
|
||||
SOURCES += ['mmx_optimized.cpp']
|
||||
SOURCES['mmx_optimized.cpp'].flags += CONFIG['MMX_FLAGS']
|
||||
|
||||
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
if CONFIG['OS_ARCH'] != 'WINNT':
|
||||
# GCC/Clang require permissions to be explicitly set for the soundtouch
|
||||
# header.
|
||||
CXXFLAGS += ['-include', 'soundtouch_perms.h']
|
||||
else:
|
||||
# Windows need alloca renamed to _alloca
|
||||
DEFINES['alloca'] = '_alloca'
|
||||
|
||||
FINAL_LIBRARY = 'gkmedias'
|
||||
FINAL_LIBRARY = 'lgpllibs'
|
||||
|
||||
# Use abort() instead of exception in SoundTouch.
|
||||
DEFINES['ST_NO_EXCEPTION_HANDLING'] = 1
|
||||
|
||||
DEFINES['BUILDING_SOUNDTOUCH'] = True
|
||||
|
17
media/libsoundtouch/src/soundtouch_perms.h
Normal file
17
media/libsoundtouch/src/soundtouch_perms.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Include file for fixing symbol visibility on non-windows platforms, until
|
||||
// system headers wrappers work uniformly across all of them.
|
||||
|
||||
#ifndef MOZILLA_SOUNDTOUCH_PERMS_H
|
||||
#define MOZILLA_SOUNDTOUCH_PERMS_H
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
#include "SoundTouch.h"
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif // MOZILLA_SOUNDTOUCH_PERMS_H
|
Loading…
Reference in New Issue
Block a user