Loading media/libaaudio/include/aaudio/AAudio.h +22 −0 Original line number Diff line number Diff line Loading @@ -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() Loading @@ -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() Loading Loading
media/libaaudio/include/aaudio/AAudio.h +22 −0 Original line number Diff line number Diff line Loading @@ -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() Loading @@ -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() Loading