mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
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.
30 lines
1.0 KiB
Swift
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"
|
|
}
|
|
}
|
|
}
|