davidliu
Committed by GitHub

Add AudioPresets and increase default audio max bitrate to 48kbps (#551)

  1 +---
  2 +"client-sdk-android": patch
  3 +---
  4 +
  5 +Add AudioPresets and increase default audio max bitrate to 48kbps
@@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
10 /.idea/deploymentTargetDropDown.xml 10 /.idea/deploymentTargetDropDown.xml
11 /.idea/misc.xml 11 /.idea/misc.xml
12 /.idea/gradle.xml 12 /.idea/gradle.xml
  13 +/.idea/runConfigurations.xml
  14 +/.idea/deploymentTargetSelector.xml
13 .DS_Store 15 .DS_Store
14 /build 16 /build
15 /captures 17 /captures
@@ -1107,11 +1107,22 @@ abstract class BaseAudioTrackPublishOptions { @@ -1107,11 +1107,22 @@ abstract class BaseAudioTrackPublishOptions {
1107 abstract val red: Boolean 1107 abstract val red: Boolean
1108 } 1108 }
1109 1109
  1110 +enum class AudioPresets(
  1111 + val maxBitrate: Int,
  1112 +) {
  1113 + TELEPHONE(12_000),
  1114 + SPEECH(24_000),
  1115 + MUSIC(48_000),
  1116 + MUSIC_STEREO(64_000),
  1117 + MUSIC_HIGH_QUALITY(96_000),
  1118 + MUSIC_HIGH_QUALITY_STEREO(128_000)
  1119 +}
  1120 +
1110 /** 1121 /**
1111 * Default options for publishing an audio track. 1122 * Default options for publishing an audio track.
1112 */ 1123 */
1113 data class AudioTrackPublishDefaults( 1124 data class AudioTrackPublishDefaults(
1114 - override val audioBitrate: Int? = 20_000, 1125 + override val audioBitrate: Int? = AudioPresets.MUSIC.maxBitrate,
1115 override val dtx: Boolean = true, 1126 override val dtx: Boolean = true,
1116 override val red: Boolean = true, 1127 override val red: Boolean = true,
1117 ) : BaseAudioTrackPublishOptions() 1128 ) : BaseAudioTrackPublishOptions()