summaryrefslogtreecommitdiffstats
path: root/pico/compat/jni
diff options
context:
space:
mode:
Diffstat (limited to 'pico/compat/jni')
-rw-r--r--pico/compat/jni/com_android_tts_compat_SynthProxy.cpp5
-rw-r--r--pico/compat/jni/tts.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/pico/compat/jni/com_android_tts_compat_SynthProxy.cpp b/pico/compat/jni/com_android_tts_compat_SynthProxy.cpp
index c9c38c4..f410ee5 100644
--- a/pico/compat/jni/com_android_tts_compat_SynthProxy.cpp
+++ b/pico/compat/jni/com_android_tts_compat_SynthProxy.cpp
@@ -40,6 +40,11 @@
#define FILTER_GAIN 5.5f // linear gain
// android.media.AudioFormat.ENCODING_ values
+//
+// Note that these constants are different from those
+// defined in the native code (system/audio.h and others).
+// We use them because we use a Java AudioTrack to play
+// back our data.
#define AUDIO_FORMAT_ENCODING_DEFAULT 1
#define AUDIO_FORMAT_ENCODING_PCM_16_BIT 2
#define AUDIO_FORMAT_ENCODING_PCM_8_BIT 3
diff --git a/pico/compat/jni/tts.h b/pico/compat/jni/tts.h
index fb15108..9e05c9d 100644
--- a/pico/compat/jni/tts.h
+++ b/pico/compat/jni/tts.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
#ifndef ANDROID_TTS_H
-#define ANDROID_TTS_H
+#define ANDROID_TTS_H
// This header defines the interface used by the Android platform
// to access Text-To-Speech functionality in shared libraries that implement
@@ -62,6 +62,9 @@ typedef enum {
} android_tts_callback_status_t;
// Supported audio formats
+//
+// NOTE: This is duplicated in compat/include/TtsEngine.h
+// Please make changes there as well.
typedef enum {
ANDROID_TTS_AUDIO_FORMAT_INVALID = -1,
ANDROID_TTS_AUDIO_FORMAT_DEFAULT = 0,