You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
694 B

#include <jni.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "srp_api_ctrl.h"
12 years ago
#define LOG_TAG "libsa_jni"
#include <cutils/log.h>
void Java_com_android_music_SetSACtrlJNI_set(JNIEnv * env, jobject obj, int effect_num)
{
unsigned long effect_enable = effect_num ? 1 : 0;
unsigned int ret;
ALOGD("Sound effect[%d]", effect_num);
ret = SRP_Ctrl_Enable_Effect(effect_enable);
if (ret < 0) {
ALOGE("%s: Couldn't enabled effect\n", __func__);
return;
}
SRP_Ctrl_Set_Effect_Def(effect_num << 5);
if (ret < 0) {
ALOGE("%s: Couldn't defined effect\n", __func__);
return;
}
return;
}