mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-05 06:01:04 +01:00
Update soundtouch to 1.7.1.
This commit is contained in:
40
lib-src/soundtouch/source/Android-lib/jni/Android.mk
Normal file
40
lib-src/soundtouch/source/Android-lib/jni/Android.mk
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2010 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# $Id: Android.mk 165 2012-12-28 19:55:23Z oparviai $
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# *** Remember: Change -O0 into -O2 in add-applications.mk ***
|
||||
|
||||
LOCAL_MODULE := soundtouch
|
||||
LOCAL_SRC_FILES := soundtouch-jni.cpp ../../SoundTouch/AAFilter.cpp ../../SoundTouch/FIFOSampleBuffer.cpp \
|
||||
../../SoundTouch/FIRFilter.cpp ../../SoundTouch/cpu_detect_x86.cpp \
|
||||
../../SoundTouch/RateTransposer.cpp ../../SoundTouch/SoundTouch.cpp \
|
||||
../../SoundTouch/TDStretch.cpp ../../SoundTouch/BPMDetect.cpp ../../SoundTouch/PeakFinder.cpp
|
||||
|
||||
# for native audio
|
||||
LOCAL_LDLIBS += -lgcc
|
||||
# --whole-archive -lgcc
|
||||
# for logging
|
||||
LOCAL_LDLIBS += -llog
|
||||
# for native asset manager
|
||||
#LOCAL_LDLIBS += -landroid
|
||||
# don't export all symbols
|
||||
# added "-marm" switch to use arm instruction set instead of thumb for improved calculation performance.
|
||||
LOCAL_CFLAGS += -Wall -fvisibility=hidden -I ../../../include -D ST_NO_EXCEPTION_HANDLING -fdata-sections -ffunction-sections -marm
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
7
lib-src/soundtouch/source/Android-lib/jni/Application.mk
Normal file
7
lib-src/soundtouch/source/Android-lib/jni/Application.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
# $Id: Application.mk 165 2012-12-28 19:55:23Z oparviai $
|
||||
#
|
||||
# Build both ARMv5TE and ARMv7-A machine code.
|
||||
#
|
||||
|
||||
APP_ABI := armeabi-v7a armeabi
|
||||
APP_OPTIM := release
|
||||
43
lib-src/soundtouch/source/Android-lib/jni/soundtouch-jni.cpp
Normal file
43
lib-src/soundtouch/source/Android-lib/jni/soundtouch-jni.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// Example Interface class for SoundTouch native compilation
|
||||
///
|
||||
/// Author : Copyright (c) Olli Parviainen
|
||||
/// Author e-mail : oparviai 'at' iki.fi
|
||||
/// WWW : http://www.surina.net
|
||||
///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Id: soundtouch-jni.cpp 165 2012-12-28 19:55:23Z oparviai $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
//#include <string.h>
|
||||
//#include <stdio.h>
|
||||
//#include <dlfcn.h>
|
||||
|
||||
#include "../../../include/SoundTouch.h"
|
||||
//#include "TimeShiftEffect.h"
|
||||
|
||||
#define LOGV(...) __android_log_print((int)ANDROID_LOG_INFO, "SOUNDTOUCH", __VA_ARGS__)
|
||||
//#define LOGV(...)
|
||||
|
||||
|
||||
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
|
||||
|
||||
using namespace soundtouch;
|
||||
|
||||
extern "C" DLL_PUBLIC jstring Java_net_surina_soundtouch_getVersionString(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
const char *verStr;
|
||||
|
||||
LOGV("JNI call soundtouch.getVersionString");
|
||||
|
||||
// Call example SoundTouch routine
|
||||
verStr = SoundTouch::getVersionString();
|
||||
|
||||
// return version as string
|
||||
return env->NewStringUTF(verStr);
|
||||
}
|
||||
Reference in New Issue
Block a user