Merge change 7811 into donut
* changes: Remove obsolete playBuffer() method from the text-to-speech SynthProxy class.
This commit is contained in:
@@ -608,24 +608,6 @@ android_tts_SynthProxy_shutdown(JNIEnv *env, jobject thiz, jint jniData)
|
||||
}
|
||||
|
||||
|
||||
// TODO add buffer format
|
||||
static void
|
||||
android_tts_SynthProxy_playAudioBuffer(JNIEnv *env, jobject thiz, jint jniData,
|
||||
int bufferPointer, int bufferSize)
|
||||
{
|
||||
LOGI("android_tts_SynthProxy_playAudioBuffer");
|
||||
if (jniData == 0) {
|
||||
LOGE("android_tts_SynthProxy_playAudioBuffer(): invalid JNI data");
|
||||
return;
|
||||
}
|
||||
|
||||
SynthProxyJniStorage* pSynthData = (SynthProxyJniStorage*)jniData;
|
||||
short* wav = (short*) bufferPointer;
|
||||
pSynthData->mAudioOut->write(wav, bufferSize);
|
||||
//LOGI("AudioTrack wrote: %d bytes", bufferSize);
|
||||
}
|
||||
|
||||
|
||||
static jobjectArray
|
||||
android_tts_SynthProxy_getLanguage(JNIEnv *env, jobject thiz, jint jniData)
|
||||
{
|
||||
@@ -711,10 +693,6 @@ static JNINativeMethod gMethods[] = {
|
||||
"(II)I",
|
||||
(void*)android_tts_SynthProxy_setPitch
|
||||
},
|
||||
{ "native_playAudioBuffer",
|
||||
"(III)V",
|
||||
(void*)android_tts_SynthProxy_playAudioBuffer
|
||||
},
|
||||
{ "native_getLanguage",
|
||||
"(I)[Ljava/lang/String;",
|
||||
(void*)android_tts_SynthProxy_getLanguage
|
||||
|
||||
@@ -108,13 +108,6 @@ public class SynthProxy {
|
||||
return native_setPitch(mJniData, pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays the given audio buffer.
|
||||
*/
|
||||
public void playAudioBuffer(int bufferPointer, int bufferSize) {
|
||||
native_playAudioBuffer(mJniData, bufferPointer, bufferSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently set language, country and variant information.
|
||||
*/
|
||||
@@ -180,9 +173,6 @@ public class SynthProxy {
|
||||
|
||||
private native final int native_setPitch(int jniData, int speechRate);
|
||||
|
||||
// TODO add buffer format
|
||||
private native final void native_playAudioBuffer(int jniData, int bufferPointer, int bufferSize);
|
||||
|
||||
private native final String[] native_getLanguage(int jniData);
|
||||
|
||||
private native final int native_getRate(int jniData);
|
||||
|
||||
Reference in New Issue
Block a user