mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
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.
This commit is contained in:
29
Yattee/Models/TVVideoSyncMode.swift
Normal file
29
Yattee/Models/TVVideoSyncMode.swift
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user