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

Commit 2b36cfeb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AAudio: Document setVolumeControlStream()" into main

parents 80ba9ce6 519e00d7
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -1115,6 +1115,17 @@ AAUDIO_API void AAudioStreamBuilder_setPerformanceMode(AAudioStreamBuilder* _Non
 *
 * The default, if you do not call this function, is {@link #AAUDIO_USAGE_MEDIA}.
 *
 * If you set Usage then you will need to associate the volume keys with the resulting stream.
 * Otherwise the volume keys may not work correctly.
 * This is done in Java with the following code block.
 *
 * <pre><code>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
 *     AudioAttributes attributes = new AudioAttributes.Builder().setUsage(usage)
 *             .setContentType(contentType).build();
 *     setVolumeControlStream(attributes.getVolumeControlStream());
 * }
 * </code></pre>
 *
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
@@ -1132,6 +1143,17 @@ AAUDIO_API void AAudioStreamBuilder_setUsage(AAudioStreamBuilder* _Nonnull build
 *
 * The default, if you do not call this function, is {@link #AAUDIO_CONTENT_TYPE_MUSIC}.
 *
 * If you set ContentType then you will need to associate the volume keys with the resulting stream.
 * Otherwise the volume keys may not work correctly.
 * This is done in Java with the following code block.
 *
 * <pre><code>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
 *     AudioAttributes attributes = new AudioAttributes.Builder().setUsage(usage)
 *             .setContentType(contentType).build();
 *     setVolumeControlStream(attributes.getVolumeControlStream());
 * }
 * </code></pre>
 *
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()