Yuri Chukhlib 6c5c9915fe Fix audio sample rate label dropping the kHz decimal (#964)
MPVTrack.detailText built its sample-rate label with integer division
(`sampleRate / 1000`), which truncates the fractional kHz. The
second-most-common audio rate — 44100 Hz (CD quality, music videos) —
showed as "44 kHz", a label that denotes 44000 Hz (a different rate),
instead of the conventional "44.1 kHz" used by VLC, mpv and every DAW.
The same defect hit 88200 -> "88 kHz", 176400 -> "176 kHz" and
22050 -> "22 kHz". Whole-kHz rates (48000, 96000, ...) were already
correct and stay unchanged. The label is live in the quality selector's
advanced details, where EmbeddedTrackRowView renders track.detailText.

- Factor the formatting into MPVTrack.formatSampleRate(_:), a pure
  static helper: divide as Double, drop the decimal for whole kHz,
  otherwise keep 1-2 meaningful digits with the trailing zero stripped
  (44.1, 88.2, 22.05).
- detailText now appends Self.formatSampleRate(sampleRate); its structure
  (codec / channelCount parts, separator, nil-when-empty) is unchanged.
- Add YatteeTests/MPVTrackFormatTests covering whole-kHz rates, the
  44.1 kHz family (the bug), half-decimal rates and the detailText
  integration.
2026-08-23 12:21:57 +02:00
2026-04-18 20:37:24 +02:00
2026-08-03 21:54:04 +00:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:37:24 +02:00
2026-08-03 23:34:06 +02:00
2026-04-23 15:45:49 +02:00
2026-04-18 20:37:24 +02:00
2026-04-18 20:38:00 +02:00
2021-11-10 00:25:38 +01:00
2026-07-18 17:38:43 +02:00

Yattee logo

Yattee

Privacy oriented video player for iOS, tvOS and macOS

AGPL v3 GitHub issues GitHub pull requests

Discord

Yattee 2 is in the works! A new version of the app is being built with a refreshed experience. It pairs with the new Yattee Server — a self-hosted backend powered by yt-dlp that supports 1000+ sites. Join the TestFlight beta to try early builds, and check the new documentation site at docs.yattee.stream for guides, roadmap and changelog.

Features

  • Native user interface built with SwiftUI with customization settings
  • Player queue and history
  • Player component with custom controls, gestures and support for 4K playback
  • Fullscreen, Picture in Picture and background audio playback
  • SponsorBlock, configurable categories to skip

License

Yattee and its components is shared on AGPL v3 license.

Description
Privacy oriented video player for iOS, tvOS and macOS
Readme AGPL-3.0 341 MiB
Languages
Swift 96.1%
Ruby 3.4%
C 0.4%
Shell 0.1%