Skip to main content

## audio_settings_jni_payload

# Function audio_settings_jni_payload

Source

    pub fn audio_settings_jni_payload(
        settings: &AudioSettings,
    ) -> Result<String, Error>

Expand description

Serialise `AudioSettings` into the JSON payload handed to the Android player over JNI.

Sanitises first (crossfade clamped, band vector normalised) so a malformed vector can never reach the Kotlin parser. JSON is used rather than a wide JNI signature so that adding a field does not change the method signature — the same approach `load()` already uses for subtitles.

The emitted keys are camelCase (serde) and `volumeLevel` is lowercase; the Kotlin side matches on those literals. Both are pinned by tests.

TRACES: UR-027, UR-032, UR-033 | DR-030, DR-035, DR-036