fix: default room 'general', cap auto codec at 24k
Some checks failed
Mirror to GitHub / mirror (push) Failing after 36s
Build Release Binaries / build-amd64 (push) Failing after 1m51s

- Android default room changed from 'android' to 'general'
- Relay choose_profile capped at GOOD (Opus 24k) — studio tiers
  (32k/48k/64k) cause high packet loss on federation paths due to
  larger datagrams exceeding path MTU. Will re-enable after MTU
  discovery is implemented.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-08 14:41:12 +04:00
parent be0441295a
commit 7dadc1ddd6
2 changed files with 4 additions and 15 deletions

View File

@@ -138,7 +138,7 @@ class CallViewModel : ViewModel(), WzpCallback {
ServerEntry("172.16.81.175:4433", "LAN (172.16.81.175)"), ServerEntry("172.16.81.175:4433", "LAN (172.16.81.175)"),
ServerEntry("193.180.213.68:4433", "Pangolin (IP)"), ServerEntry("193.180.213.68:4433", "Pangolin (IP)"),
) )
const val DEFAULT_ROOM = "android" const val DEFAULT_ROOM = "general"
} }
fun setContext(context: Context) { fun setContext(context: Context) {

View File

@@ -89,20 +89,9 @@ pub async fn accept_handshake(
/// Select the best quality profile from those the caller supports. /// Select the best quality profile from those the caller supports.
fn choose_profile(supported: &[QualityProfile]) -> QualityProfile { fn choose_profile(supported: &[QualityProfile]) -> QualityProfile {
// Prefer higher-quality profiles. Use GOOD as default if supported list is empty. // Cap at GOOD (24k) for now — studio tiers (32k/48k/64k) not yet tested
if supported.is_empty() { // for federation reliability (large packets may exceed path MTU).
return QualityProfile::GOOD; QualityProfile::GOOD
}
// Pick the profile with the highest bitrate.
supported
.iter()
.max_by(|a, b| {
a.total_bitrate_kbps()
.partial_cmp(&b.total_bitrate_kbps())
.unwrap_or(std::cmp::Ordering::Equal)
})
.copied()
.unwrap_or(QualityProfile::GOOD)
} }
#[cfg(test)] #[cfg(test)]