Commit 3f6f4dd7 authored by Daniel Sonck's avatar Daniel Sonck
Browse files

Merge pull request #25 in THFM/fm.touhou.touhoufm from bugfix/THFMA-15 to development

* commit 'a219d434':
  [THFMA-15]
parents 08d23ced a219d434
......@@ -20,10 +20,11 @@ buildscript {
maven {
url 'https://maven.google.com'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.3.1'
}
}
......@@ -67,8 +68,6 @@ android {
compileSdkVersion 27
buildToolsVersion "26.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
......
......@@ -23,6 +23,10 @@ add_library( # Specifies the name of the library.
# Provides a relative path to your source file(s).
opusJni )
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES )
add_subdirectory(opus)
find_library(log-lib log)
......
......@@ -17,7 +17,6 @@
*
*/
#include <stdint.h>
#include <android/log.h>
#include <malloc.h>
......@@ -94,7 +93,7 @@ jint decodeBytes(JNIEnv *env, jobject obj, jbyteArray in, jshortArray out) {
jbyte *encodedData = env->GetByteArrayElements(in, nullptr);
opus_int16 *data = new opus_int16[outputArraySize];
int decodedDataArraySize = opus_decode(gOpusDecoder, static_cast<const unsigned char *>( encodedData ), inputArraySize, data, FRAME_SIZE, 0);
int decodedDataArraySize = opus_decode(gOpusDecoder, static_cast<unsigned char*>(static_cast<void*>( encodedData )), inputArraySize, data, FRAME_SIZE, 0);
if(decodedDataArraySize > 0) {
if(decodedDataArraySize * CHANNELS <= outputArraySize) {
......@@ -102,7 +101,7 @@ jint decodeBytes(JNIEnv *env, jobject obj, jbyteArray in, jshortArray out) {
} else {
sprintf(logMsg, "Output array of size: %d to small for storing decoded data.",
outputArraySize);
__android_log_write(ANDROID_LOG_DEBUG, "Native Code:", logMsg);
__android_log_write(ANDROID_LOG_DEBUG, "libopus", logMsg);
return -1;
}
......
Fixed memoryleak in decoder causing slowness of the OS and random app crashes
Newer streaming technology which should improve streaming over low bandwidth connections.
\ No newline at end of file
Better layout that is more consistent between portrait/landscape
Quality settings
Improved login
\ No newline at end of file
......@@ -3,9 +3,10 @@ buildscript {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'org.ajoberstar:grgit:2.1.0'
classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
......
#Wed Nov 01 00:17:57 CET 2017
#Sun Feb 10 21:02:19 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment