Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9011ec83 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Fix bug 2084122: enable application control over text synth volume

This CL unhides two "keys" an application can use to specify for
 an utterance its playback volume and pan. Those two new keys
 use the same mechanism already in place for an application to
 specify stream type and utterance ID.

Change-Id: I020363487d7a0f471fb8d3ed739c561d2ab4b0a9
parent d5208cf4
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -173598,6 +173598,17 @@
 visibility="public"
>
</field>
<field name="KEY_PARAM_PAN"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;pan&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="KEY_PARAM_STREAM"
 type="java.lang.String"
 transient="false"
@@ -173620,6 +173631,17 @@
 visibility="public"
>
</field>
<field name="KEY_PARAM_VOLUME"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;volume&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
</class>
<interface name="TextToSpeech.OnInitListener"
 abstract="true"
+2 −4
Original line number Diff line number Diff line
@@ -349,19 +349,17 @@ public class TextToSpeech {
         */
        public static final String KEY_PARAM_UTTERANCE_ID = "utteranceId";
        /**
         * {@hide}
         * Parameter key to specify the speech volume relative to the current stream type
         * volume used when speaking text. Volume is specified as a float ranging from 0 to 1
         * where 0 is silence, and 1 is the maximum volume.
         * where 0 is silence, and 1 is the maximum volume (the default behavior).
         * @see TextToSpeech#speak(String, int, HashMap)
         * @see TextToSpeech#playEarcon(String, int, HashMap)
         */
        public static final String KEY_PARAM_VOLUME = "volume";
        /**
         * {@hide}
         * Parameter key to specify how the speech is panned from left to right when speaking text.
         * Pan is specified as a float ranging from -1 to +1 where -1 maps to a hard-left pan,
         * 0 to center, and +1 to hard-right.
         * 0 to center (the default behavior), and +1 to hard-right.
         * @see TextToSpeech#speak(String, int, HashMap)
         * @see TextToSpeech#playEarcon(String, int, HashMap)
         */