Committed by
GitHub
Add AudioPresets and increase default audio max bitrate to 48kbps (#551)
正在显示
3 个修改的文件
包含
20 行增加
和
2 行删除
.changeset/cyan-cups-wave.md
0 → 100644
| @@ -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 |
| @@ -21,4 +23,4 @@ | @@ -21,4 +23,4 @@ | ||
| 21 | node_modules/ | 23 | node_modules/ |
| 22 | npm-debug.log | 24 | npm-debug.log |
| 23 | yarn-debug.log | 25 | yarn-debug.log |
| 24 | -yarn-error.log | ||
| 26 | +yarn-error.log |
| @@ -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() |
-
请 注册 或 登录 后发表评论