Files
yattee/Yattee/Models/TVVideoSyncMode.swift
Arkadiusz Fal c168fbae02 Add tvOS A/V sync diagnostics on its own settings page
Surface audio-delay (±10/±100 ms) and video-sync-mode controls behind an
"A/V Sync" navigation row in Advanced settings rather than inline, keeping the
Advanced page uncluttered. Audio delay applies live to the running MPV
instance; sync mode takes effect on next playback.
2026-05-14 09:43:25 +02:00

30 lines
1.0 KiB
Swift

//
// TVVideoSyncMode.swift
// Yattee
//
// MPV `video-sync` mode override exposed on tvOS for A/V sync debugging.
//
import SwiftUI
enum TVVideoSyncMode: String, CaseIterable, Codable {
/// Lock video to display refresh, drop/repeat frames to match. Audio plays at PTS.
/// Current shipping default.
case displayVdrop = "display-vdrop"
/// Lock video to display refresh; resample audio to match. Eliminates A/V drift
/// when the display mode doesn't match content fps, at the cost of tiny audio
/// pitch correction.
case displayResample = "display-resample"
/// libmpv default: video adjusts to audio. Most forgiving when display-mode
/// matching is uncertain.
case audio
var displayName: LocalizedStringKey {
switch self {
case .displayVdrop: "settings.playback.tvVideoSyncMode.displayVdrop"
case .displayResample: "settings.playback.tvVideoSyncMode.displayResample"
case .audio: "settings.playback.tvVideoSyncMode.audio"
}
}
}