504 Commits
Author SHA1 Message Date
zarzet 30ec85296b fix(usb): convert when the endpoint is too small, and queue 1.5 s at any rate
A DAC limited to 48 kHz has an endpoint too small for 96 kHz. That check
runs first and was classed as an unsupported DAC, so the song went to
Android's mixer instead of being converted. It now counts as a refused
format and the next rate is tried, without touching the DAC.

The output queue held 200 ms or 256 KiB, whichever is more: 1.5 s for a
CD-rate song but a third of a second at 96 kHz in 32-bit, so a short stall
of the source thread (another app opening) cut high-rate songs only. It
now holds 1.5 s at every rate. Pause and seek still flush it at once.
2026-11-18 21:59:04 +07:00
zarzet da608a6638 fix(usb): never set a rate the DAC's clock does not list, and add a rate limit
A song whose rate the DAC refuses is already converted, but the DAC was
still asked for that rate first, for every song, and a DAC that takes the
request and then plays silence was never converted at all.

- Read the UAC2 clock's RANGE before setting a rate and refuse one it
  does not list, without touching the clock.
- Remember per connected DAC the rate a song rate played at, so the
  refused rate is not requested again on each song.
- Add "Highest sample rate" to the Direct USB settings (Automatic by
  default): rates above it are never requested and such songs are
  converted down.
2026-11-18 21:48:21 +07:00
zarzet 208bd75696 feat(usb): resample a song whose rate the DAC refuses
A DAC that tops out at 48 kHz refused 96 kHz songs, so they fell back to
Android's mixer and played through a DAC still set to the low level the
direct driver leaves it at, which sounded like silence.

Direct USB now tries the other standard rates when the DAC refuses the
song's own: lower rates first, the song's own family ahead of the rest,
then higher ones. The song is converted with a Kaiser windowed sinc
polyphase filter (130 dB stopband, passband to 0.907 of the lower
Nyquist), with triangular dither for a 16-bit output. The status line
names both rates and Audio info no longer calls such a song bit-perfect.

DSD is never converted, and a DAC is asked at most four times.
2026-11-18 01:00:13 +07:00
zarzet c832fa191d fix(android): keep the player widget working before Android 12
A widget may call View.setAlpha only from Android 12. On older versions
the call failed the whole widget and crashed its settings screen (seen on
Android 9). There the two images of a disabled button are dimmed instead.
2026-11-17 21:04:48 +07:00
zarzet 1fae546824 fix(android): ask for the display's highest refresh rate
Neither Flutter nor the app asked Android for a display mode, and
several phone makers hold such an app at 60 Hz. The activity now asks
for the fastest mode at the resolution in use (not on a television),
and the app log notes the refresh rate the device gives it.
2026-11-17 15:34:58 +07:00
zarzet 7ba21b44ed feat(link): expose the phone's Link server to Flutter
Android and iOS carry the link* calls and events of the Rust LinkBridge
on com.zarz.mornye/link, so a phone can host Link for other phones.
2026-11-17 03:09:29 +07:00
zarzet 7aa2f37496 chore: remove comments that restate the code
One-line doc comments and inline comments that only repeat the name, the
type or the next statement of what they describe, in the Dart, Kotlin and
desktop runner sources. Comments that state a reason, a constraint, a
unit, a value set or a platform quirk stay. No code changes.
2026-11-17 02:06:37 +07:00
zarzet 967a2d6f6f fix(media3): decode as float only what holds more than 16 bits
With float output on, media3 asks every decoder for float samples, the
phone vendor's MP3 and AAC decoders included. No other player on the
phone asks for that, so a decoder that handles the request badly shows
only in this engine; testers on Samsung phones report noise and trouble
playing with it on. Float keeps the low bits of 24 and 32-bit files and
adds nothing to the rest.

Lossy songs and files of 16 bits or fewer are now decoded as 16-bit PCM,
as every other player decodes them. A lossless file of more than 16 bits
or of unknown depth keeps float. A decoder is not reused between the two.

The engine also sends the decoder that ran, the output it opened and the
first times that output ran dry to the app log, so a log export from an
affected phone shows what its audio stack did. No path or title is
logged.
2026-11-16 23:06:50 +07:00
zarzet d7ac319fce fix(android-auto): find covers stored under the app folder's other path
Browse lists and queue items reached a car without artwork. Android
gives the app's files as /data/user/0/<package>, a link to
/data/data/<package>. The cover provider named its folders by the
first, scanned Library covers are stored under the second, and both
sides compared the two as text, so no cover file was ever found in a
served folder and no content URI was handed out. The provider itself
served the files.

Each folder now knows its path without symbolic links as well. Kotlin
uses both for queue items, and reports them to Dart as aliases for
browse items.
2026-11-16 21:27:18 +07:00
zarzet c163b8858e fix(cast): serve the TV from an address on its own network
The media server asked the OS which local address routes to the TV.
Android routes each app through an active VPN, and through mobile data
when Wi-Fi is not the default network, so the TV was handed an address
it could not reach: it connected, showed the Cast screen and never
played, ending in Google Cast timeout 15 or the app's own 25 second
limit.

Pick the interface address whose network holds the TV and fall back to
the route only when there is none. Rebind when this device's address
changed, say what to check when the TV cannot reach the device, and let
the platform's answer arrive before the app's own limit on a load.
2026-11-16 17:41:55 +07:00
zarzet 064f02b5de perf(player): list an Android song's folder once for its sidecars and cover
Starting a song from a granted Android folder looked for the .mlrc file,
the .lrc file and cover.mp4 with three separate native calls, each
resolving the song's parent again and listing the whole folder to find one
name. Big flat folders paid that three times on every song start.

One native call now resolves the parent once, reads the song's name once
and finds every wanted name in a single listing, returning uri, size and
modification time for each file that exists. A small Dart lookup shares
that answer between the lyrics sidecar reads and the motion cover lookup
for a few seconds, so one song start lists the folder once while a later
start of the same song asks again. Writing a sidecar or a tag change of
the song forgets the shared answer. Sidecar contents are read by document
uri only for files that exist, with the same 8 MB cap. Name rules are
unchanged and now live in a pure helper with JVM tests.
2026-11-16 16:17:06 +07:00
zarzet 2bc6631ab9 fix(downloads): keep the wake lock for every path that still needs it
Review of the paused-queue wake lock change found three paths that could
run or wait without a lock:

- The Wi-Fi fallback poll (used only when registerNetworkCallback
  failed) held the lock by policy, but nothing renewed it once the
  progress coordinator slept, so it expired after 30 minutes and the poll
  stalled with the CPU asleep. The poll now renews it on each pass.
- In Wi-Fi only mode Flutter pauses the queue itself when Wi-Fi drops,
  so when Wi-Fi returns the native callback clears only the network
  pause and the resume still has to travel through Flutter and
  startService, with nothing holding the CPU. Wi-Fi return now takes a
  60 s timed wake lock with its own tag (never a short timeout on the
  main lock). Resume, service stop and destroy release it.
- The run's teardown (album ReplayGain, final snapshot, service stop)
  had no busy worker, so a pause or Wi-Fi drop right after the last song
  released the lock under it. The teardown now counts as busy.

A queue still being prepared by Flutter keeps the lock while paused, as
before, and onNativeWorkerStateChanged applies the lock before it wakes
waiters.
2026-11-16 16:16:20 +07:00
zarzet e07a999e9d fix(downloads): release the wake lock while the queue is paused
A queue the user paused, one waiting for Wi-Fi, or one stopped for
verification kept a partial wake lock for as long as the service lived:
the progress coordinator renewed it on every pass and updateNotification
re-acquired it, while each worker woke every 500 ms and the coordinator
long-polled the backend every few seconds. The CPU never suspended.

The wake lock now follows NativeWorkerPolicy.shouldHoldWakeLock: a
native run that is paused with no worker still running an item drops
it. Workers count themselves busy while they run an item. Every write to
the pause, cancel, generation, network or busy state goes through
onNativeWorkerStateChanged, which wakes waiters and re-applies the policy
synchronously, so resume, Wi-Fi return and the end of a pause
cancellation reacquire the lock before their caller returns. Workers and
the progress coordinator suspend on a NativeWorkerSignal instead of
polling. Cancel keeps the lock until the service stops; the legacy
progress-only mode and the Wi-Fi fallback poll keep their old behaviour.
2026-11-16 16:16:20 +07:00
zarzet fa667d6a0d chore(deps): update packages, Rust 1.100.0 and Gradle 9.9.1
Dart packages move to their newest compatible releases, among them
dart_smb2 0.4.1 (libsmb2-r13: uploads that reconnect can rename their
temporary file, no wait for ever on a reply that stops, OpenSSL
signing), record 7.2.0, archive 4.7.1, file_picker 13.3.3 and
material_ui 1.11.0. Rust moves to 1.100.0 with rusqlite 0.43.0,
zip 9.6.0, notify 8.2.2 and the transitive crates. Gradle moves to
9.9.1.

Held back on purpose: flutter_secure_storage 11 (the extension storage
key lives there), flutter_rust_bridge (smtc_windows needs 2.11.1), the
Unicode 15 crates, and desktop_drop, dbus and connectivity_plus, which
wait for cross_file 0.4 in file_picker and share_plus.
2026-11-15 21:51:31 +07:00
zarzet 931dd4e398 fix(usb): keep the DAC level across a track change
Direct USB closes and reopens the DAC for every song and never restores
a level above the one the DAC reads when opened. Between two songs the
app lets go of the DAC and the system's USB audio driver takes it back;
when that driver lowers the DAC's volume, the lower reading became the
new ceiling and every song played quieter than the last, with the phone's
volume buttons unable to raise it.

A reopen within ten seconds of the app's own close is a track change:
the level that was playing stands. A DAC opened later, or for the first
time, is still never made louder than it connects. The level a song
plays at is what the next one keeps, so a capped level is not undone.

The prepare reply now carries what the DAC read when opened, the
remembered level and the time since release, logged as one line per
song so a tester run with Detailed Logging shows where a level fell.
2026-11-15 17:48:55 +07:00
zarzet fac1975704 feat(convert): offer ALAC as an automatic conversion format
Auto-convert now offers M4A (ALAC) next to MP3, AAC, Opus and FLAC
(issue 900). ALAC follows the FLAC rules: lossy and DSD sources are
kept, the maximum bit depth, sample rate and Smart Dither settings
apply, and an ALAC file within the limits is left alone. Only the
probed codec marks an .m4a as ALAC, so AAC is never taken for it.

The Dart finalizer reuses the manual ALAC converter and embeds tags as
M4A. The Android background finalizer encodes ALAC with planar
samples into the ipod muxer, keeping tags and artwork, and records the
.m4a container instead of falling back to MP3.
2026-11-15 17:43:22 +07:00
zarzet 6c718fd7bc fix(files): edited songs no longer turn hidden on local and mounted drives
Tag, lyrics and cover writes, in-place conversions, FFmpeg stages and
M3U writes staged next to the song under a name with a leading dot and
renamed it over the song. Samba and NTFS drivers with hide_dot_files
mark a dot name hidden when it is created and keep the attribute
through the rename, so songs edited on a pendrive, an NTFS disk or a
mounted NAS share showed as hidden in Windows Explorer.

The stages now start without a dot and keep a `.partial` part that
library scans already skip; the desktop watcher ignores `.partial.<ext>`
stages too. FFmpeg sweeps still remove dotted stages left by earlier
versions. Songs already hidden keep the attribute until it is cleared
or the song is saved again.
2026-11-11 21:21:19 +07:00
zarzet b98f81046a fix(usb): set the rate on the clock source behind a clock selector
XMOS-based DACs such as the FiiO BTR15 point their input terminal at a
clock selector, not a clock source. Direct USB sent the 4-byte sample
rate request to the selector, which answers with its 1-byte input pin,
so playback fell back with "Short USB control response".

Parse UAC2 clock source, selector and multiplier descriptors and follow
the terminal's clock to its source, reading the selector's current
input when it has more than one. Devices without clock descriptors keep
the old behavior.
2026-11-11 17:59:54 +07:00
zarzet 20d995564d fix(usb): drive a DAC with several USB configurations
Direct USB refused any DAC whose raw descriptors held more than one
configuration ("Multiple USB configurations are not supported"), so a
UAC 2.0 DAC that also offers a UAC 1.0 fallback configuration always
fell back to the system mixer. Direct USB now asks the DAC which
configuration the kernel set (GET_CONFIGURATION) and passes only that
one to the descriptor parser, or the first one when the DAC does not
answer, as the kernel picks for a UAC1/UAC2 device.
2026-11-11 16:39:11 +07:00
zarzet 6fb6f4f540 fix(usb): play mono on stereo DACs and remember a declined USB prompt
A mono song on a stereo-only DAC now goes out with each sample unchanged
on both channels, tried after the song's own layout and before a lossy
source drops to 16-bit; the first refusal still names the requested
format.

A declined or unanswered USB access prompt is remembered for the session
per DAC (vendor and product id), so later songs report it without
prompting again. Turning the Direct USB driver on, or plugging the DAC in
again, clears it, and the status says so.
2026-11-11 12:17:01 +07:00
zarzet 4b7edf89ce fix(usb): explain Direct USB fallbacks and decode compressed formats
Direct USB reduced every failure to "unsupported", so the app showed one
generic label and a tester with a working DAC could not tell why. It
also played only FLAC, WAV and DSD.

Failure reasons: the native side now reports format_unsupported,
decoder_unavailable, channels_unsupported, dac_format_rejected,
dac_unsupported, dac_open_failed and timeout, with the source codec,
rate, depth and channels. Rust errors are classified by message, and
"No compatible USB format" now names the request and the PCM layouts
the DAC offers, for the log. A file Direct USB cannot play is probed
from its headers before the USB permission prompt, so it reports its
reason without a prompt. The Android 14 mixer and AAudio paths reuse
the source reasons, and the mixer reports a refused rate or depth and
a timeout separately. A source that stops decoding during playback
pauses with decode_failed instead of route_changed.

Formats: with Direct USB, MediaCodec decodes ALAC and FLAC in MP4/Ogg
losslessly, and AAC, MP3, Opus and Vorbis as lossy sources.
Lossless sources up to 16 bits use integer output; 17 to 24-bit
sources use float output, which BitPerfectPcm checks sample by sample.
32-bit lossless sources are refused. Lossy output is rounded to the
DAC's precision without dither, at 24 bits or 16 bits when the DAC
offers nothing deeper. The decoder is primed before the device opens,
so HE-AAC reports its real rate; a later format change stops playback.
Encoder delay and padding are trimmed by frame count, and a seek flushes
the decoder and skips to the exact frame. Multichannel files are
refused, never downmixed. libFLAC and WAV sources are unchanged.

The status label and Audio info mark a decoded lossy source, so a
direct transport is not shown as a bit-perfect lossless chain.
2026-11-11 12:17:01 +07:00
zarzet 9e5313ff22 feat(playback): apply speed and pitch in every deck
Every deck now multiplies its rate by playbackSpeed and applies
playbackPitch at once, also mid-song and while paused, and reports
what it can do through PlaybackDeck.tempoSupport.

- audioplayers: effective rate, and a per-player setPitch on the forks'
  channel, sent only when it differs from the default and again for
  each source so a refusal reports speed only for that source. Direct
  output ignores both; Windows and Linux report speed only.
- Old Android engine: setPitch in the vendored audioplayers_android,
  applied through MediaPlayer playback parameters with the speed.
- media3: setPlaybackParameters (speed and pitch) replaces setRate; the
  AudioTrack buffer is sized for 2.5x.
- libmpv: speed and audio-pitch-correction, and a semitone shift in the
  equalizer's af chain: a lavfi rubberband filter where the build has
  one, otherwise resampling with mpv's scaletempo.
- Cast reports none; switching decks report their active deck.
2026-11-11 01:52:25 +07:00
zarzet 525f0a7d07 feat(store): multi-repository channel methods on Android and iOS
Map setRepoRegistryUrls, resolveRepoRegistryUrl, getRepoCatalog and
downloadRepoExtension (with an optional registry_url) to the new native
repository API and drop the single-URL methods.
2026-11-09 03:40:59 +07:00
zarzet a4a476e44e feat(playback): spatial audio switch for the platform spatializer
A Spatial audio switch in Playback settings, on by default, in the Audio
output group of both styles: after Skip silence on Android, after
exclusive output on macOS, and in its own Audio output group on iOS.
Windows and Linux have no row and no search entry. The app renders
nothing; the switch only tells the platform whether it may spatialize.

- media3: a new `setSpatialAudio` call maps to the audio attributes'
  spatialization behavior (auto or never). It applies live: the sink
  reopens its AudioTrack and drops its buffer, so native seeks to the
  current position to decode that audio again instead of skipping it.
- Old Android engine: the fork takes `setSpatialAudio` on its player
  channel (no platform interface change) and sets the behavior on API
  32+ as each source loads, so a change applies from the next song. The
  subtitle says so while the new engine is off.
- iOS and macOS: the Darwin fork sets allowedAudioSpatializationFormats
  (iOS 14, macOS 11) to mono, stereo and multichannel or to none, on the
  current item and every new one.

The subtitle ends with a live status line. Android reads the
Spatializer (available, enabled, head tracker, and canBeSpatialized for
stereo and 5.1) over a new event channel that re-reads on spatializer,
head tracker and device changes and on resume. iOS reports whether the
output port has spatial audio enabled, on route and spatial capability
changes. The line names the direct USB and AAudio paths and macOS
exclusive output, which never reach the system's spatial audio.
2026-11-09 02:41:48 +07:00
zarzet 46db8c84b8 Merge branch 'feat/batch-sw' into feat/batch-int 2026-11-08 16:50:00 +07:00
zarzet ddf8741534 fix(haptics): let swipe ticks follow the touch feedback setting
The native pulse channel takes an optional usage. Touch pulses play
with VibrationAttributes.USAGE_TOUCH on Android 13 and later, and as
assistance sonification below that, so the system's touch feedback
switch controls them. A pulse without a usage stays media vibration,
so Music Haptics is unchanged. iOS ignores the usage. The queue swipe's
haptics now send touch pulses.
2026-11-08 16:49:40 +07:00
zarzet 0b390d60c6 feat(playback): skip silence on the new Android engine
A Skip silence switch in Playback settings, off by default, shown on
Android phones and tablets under the new playback engine. It works only
through media3: while that engine is off the switch is disabled and its
subtitle says why. Changes apply live through a new `setSkipSilence`
call on the media3 channel, sent after `create` and on every change.

media3 skips silence in its audio processor chain, which it bypasses
for float PCM, and it asks every decoder for float once the sink takes
float output. While the setting is on, the renderer therefore asks
decoders for 16-bit PCM and refuses to reuse a decoder set up for the
other mode, so hi-res sources lose their low bits while it is on (the
subtitle says so). A decoder already running keeps its mode: turning
it on mid-song starts skipping from the next song, turning it off
stops at once.

Interplay:
- AutoMix: suspended while AutoMix is on. AutoMix times its fade start
  and beat matching on the clock from analysed file positions, which
  skipping would outrun. The subtitle says so.
- Gapless: `queueNext` stays on the same player, so the trailing and
  leading silence around the handoff is skipped too; the 30 s lead
  leaves the queue call far ahead of the end.
- Position, duration, synced lyrics: media3 reports media time, which
  jumps forward over a skipped passage, so lyrics stay in sync and the
  duration is unchanged.
- Scrobbling and listening statistics count listened wall time, so a
  song with long silences counts slightly less time; the thresholds are
  far from that.
2026-11-08 16:23:27 +07:00
zarzet a2c01d72bf feat(library): use folder images as covers for songs without one
Large libraries often keep album art as cover.jpg or folder.jpg beside
the songs instead of embedding it, so those songs showed no cover.

When a song has no embedded artwork, local scans now fall back to an
image in its folder: cover, folder, front, album, albumart (jpg, jpeg,
png, webp), case-insensitive, ignoring hidden and AppleDouble files. A
disc folder (CD1, Disc 2, ...) without one uses its parent's image.
Embedded artwork always wins.

The Rust path scan (desktop, iOS, Android file paths) picks the image
from the directory listing it already makes and hands it to the
workers; the thumbnail key includes the image path, size and mtime, so
a replaced image gets a new thumbnail. CUE tracks get the same
fallback. The Android SAF scan picks the image from its own listing
through new FFI helpers and makes each image into a content-named
thumbnail once per scan.
2026-11-08 15:54:58 +07:00
zarzet e0653009b2 build(android): update Media3 to 1.11.1
Pins every androidx.media3 module to 1.11.1 from the root build, so
video_player_android's exoplayer, HLS, DASH, RTSP and SmoothStreaming
modules (which still ask for 1.9.2) resolve to the same version as the
playback engine.

1.11.1 keeps the float output and Sonic rules the engine relies on for
high resolution PCM and platform speed changes. The PCM AudioTrack
buffer is now a fixed 500 ms instead of four times the platform minimum,
so with the 2x cap the engine buffers 1 s at 1x; the comments now say so.
2026-11-08 03:45:07 +07:00
zarzet 3c20cac699 feat(files): remove the folders a deleted song leaves empty
Deleting songs from the app left their album and artist folders behind,
so people had to clean them up with a file manager. The song's own .lrc
and .mlrc files stayed too, which kept those folders from being empty.

Deleting a song now also deletes its .lrc and .mlrc files, unless
another song in the folder has the same name. Settings > Files >
Existing Files gains Remove Empty Folders, on by default: once a song is
gone, the folders it leaves empty are removed, up to but never including
the download folder or a Local Library folder, and never a storage,
volume or home folder or a folder right inside one, such as Music or
Download. A folder still counts as empty when it only holds system index
files, Mornye's cover.mp4 or lyrics files of songs that are gone.
Folders are removed while the download queue is idle, so a download
never loses the folder it writes into.

Every place that deletes a song from the library goes through this:
the library and album screens, song details, Duplicate Review and
Mornye Link. Android storage access folders work through two new
platform calls that find a song's folders before it is deleted and list
a folder. Network songs and CUE tracks are only deleted, as before.
2026-11-08 02:43:14 +07:00
zarzet 5c513133f7 fix(android): size the media3 audio buffer for 2x speed
With AudioTrack playback parameters media3 sizes the PCM buffer for 8x
speed, about 3 s at normal speed. Once a song's end is in that buffer the
track is told to play out, so a song queued later (for example after a
seek near the end) made the handoff open a new AudioTrack with a short
gap. Size the buffer for 2x instead, a quarter of the size and still at
least the normal buffer's time up to 2x, above the app's 1.2x maximum.
Volume, speed and the session equalizer act after the buffer.

Add an instrumentation test that measures queued handoffs with an
analytics listener: audio tracks opened, underruns and total play time.
2026-11-08 00:17:44 +07:00
zarzet 884864745d feat(android): add a media3 ExoPlayer playback engine channel
Add com.zarz.mornye/media3_player with per-player event channels for
ordinary mixer playback through media3 1.9.2, the version
video_player_android already bundles. Players live on one owned
HandlerThread looper; create replies after its event channel is
registered. Offload, audio focus and becoming-noisy handling are off,
the session id is set before the first source, and the wake mode follows
the source type.

SAF leases are duplicated and read through media3's
FileDescriptorDataSource, closed once the item has left the playlist and
its last reader closed. queueNext appends to the same playlist for
gapless playback and reports the transition; a queued item whose load
fails is dropped so the current one plays out, then reported as the
failed current item. High-resolution PCM uses float output with platform
playback parameters for speed. The DynamicsProcessing equalizer is
copied from the audioplayers fork.
2026-11-08 00:17:44 +07:00
zarzet 9379513549 fix(player): keep the lyric line opt-in and in sync
Follow-up to the lyric line under the track title (PR #847).

- The setting is off by default; Lyrics settings and settings search turn
  it on, with localized English and Indonesian strings.
- Opening the player no longer probes unresolved SAF documents for the
  line. It shows once playback publishes the resolved source, as before.
- The line follows audio_service's extrapolated position, the playback
  speed and the lyrics timing offset, like the desktop mini player. The
  timer targets the next line's start with the 80 ms lead applied, so it
  no longer fires zero-delay timers before each line, and it stops while
  paused, buffering, seeking or offstage.
- With the setting off nothing subscribes to playback.
- A translated line shows as plain text; word timing applies only to the
  original line.
- Text uses the theme's body style, the chevron mirrors in right-to-left
  layouts, alignment is directional and reduced motion skips the fade.
- The line reads as one Lyrics button to screen readers.
- Drops the unrelated Android lint opt-out and .gitignore entry, and uses
  generic test data. New tests cover the default, the offset, timing,
  seeking, and the player waiting for a resolved source.
2026-11-07 21:02:30 +07:00
PrathxmOp 0b51c40620 feat(player): add real-time synchronized lyrics preview under track header
- Render interactive single-line synced lyric preview under title and artist
- Support word-by-word real-time karaoke sweep with WordTimedLyricLine
- Interpolate playback clock with microsecond precision and schedule line boundary timers to eliminate line switch delays
- Auto-inspect embedded lyrics on Now Playing screen without requiring opening lyrics page
- Add playerShowLyricSnippet setting toggle
- Add comprehensive widget tests and disable release lint checks in android
2026-11-07 20:49:26 +07:00
zarzet 6c5e727450 feat(lyrics): show the sung line on the lock screen
An opt-in setting replaces the song title in the system media
controls with the current synced lyric line. Only the OS sees it:
the wrapper sits under the media session filter, so Last.fm,
Discord, widgets and Link keep the real title.

Lyrics come from the file and its .mlrc sidecar, never online.
Breaks of 3 s or more show the title, and the title changes at
most twice a second. Android shows lines only while the keyguard
is up and the screen is on; iOS cannot tell, so it shows them
while Mornye is in the background and restates the position first
so Now Playing does not jump back.
2026-11-07 20:12:07 +07:00
zarzet 8fe787a002 feat(convert): let Smart Dither use TPDF HP
Smart Dither only adds dither when lowering bit depth, but it always used
plain TPDF. A new Use TPDF HP switch makes it use high-pass TPDF instead,
in the convert sheet (shown while Smart is selected) and for automatic
FLAC conversion of downloads (under Smart Dither, saved as
autoConvertSmartDitherHighPass). The native Android finalizer, the
Dart FFmpeg path and Mornye Link conversions all honor it; Link sends it
as ditherHighPass, which older desktops ignore. The switch is off by
default, so existing conversions do not change.

The explicit Triangular HP option is now labelled TPDF HP, next to TPDF.
2026-11-07 19:48:04 +07:00
zarzet b3e50985fc chore(android): update AGP to 9.5.1 and Gradle to 9.9.0 2026-11-07 18:54:53 +07:00
zarzet efe4df0e1f feat(motion): save animated covers as cover.mp4 in album folders
An opt-in Files setting copies a download's animated cover into its
album folder as cover.mp4, so file managers and other players find it.
Only folders that hold one album get it: the folder is planned again
with a marked album name, and flat, artist, playlist and shared Singles
folders are skipped, as is a song kept in a folder other than the
planned one. An existing cover.mp4 is never replaced, for local files,
Android folder access and network storage alike; songs of one album
that finish together write it once.

The player, mini player and album headers now show a cover.mp4 found
beside a local song before the artwork saved for the album. Android
documents are found through a new findSafSibling call and copied into
app storage once per version, since the video player only opens files.
2026-11-07 16:04:21 +07:00
zarzet 305037a907 feat(lyrics): save translations to .mlrc files
Saving a lyrics translation now covers every kind of lyrics:

- Plain lyrics can be translated on request. Each line's pronunciation
  and translation show under it. Automatic translation stays synced-only.
- AI pronunciation is saved too, with its word timing, as x-romaji and
  x-romaji-words tags next to the translation.
- A new .mlrc file next to the song keeps its lyrics with their
  translation and pronunciation and leaves the audio file as it is. It is
  UTF-8 LRC that starts with [x-mlrc:1]. Supplement tags are keyed by
  line time, or by line index for lyrics without timing. TTML is written
  as enhanced LRC with voices and backing vocals. The player reads it next
  to local and Android document songs and lays it over the song's lyrics
  by line text.
- AI Translation settings gain a Files section: Save To picks the song
  file or a .mlrc file, and Save Automatically saves each shown
  translation without a snackbar. TTML and plain lyrics always go to
  .mlrc. Saving into the song file also refreshes an existing .mlrc.
- Android reads and writes the sidecar through new SAF calls, and the
  .lrc sidecar write shares the same code.
2026-11-07 15:19:06 +07:00
zarzet fe33d6c7c9 feat(audio): add smart dither for file conversion 2026-11-07 01:23:32 +07:00
zarzet d290a4cee3 fix(cast): stop treating every TV media error as fatal
Android failed the song on any media error message from the receiver,
even if the TV kept playing. The app then showed "TV could not play this
audio file", stopped following the position and stopped sending Pause.

Fail only when the receiver stops with an error, as the iOS and desktop
sender already does. Media errors now reach the app log with their reason
and code on every platform, so a failed seek can be traced.
2026-11-07 01:22:35 +07:00
zarzet bf2d72a395 fix(android): register player events before create replies
Since player operations moved off the UI thread, create replied before
the event channel's main-thread registration ran. Dart listened to a
stream with no handler, lost the prepared event, and playback loaded
forever. Reply after the registration instead.
2026-11-05 17:05:36 +07:00
zarzet c065e4ebeb fix(android): move player operations off the UI thread 2026-11-05 15:52:38 +07:00
zarzet 20e5b550d9 chore: neutralize UI terminology and clarify code comments 2026-11-04 22:53:56 +07:00
zarzet 38172a4b12 fix(orientation): let tablets rotate outside the full player (#807)
Tablets (shortest side at least 600dp) may use every orientation outside
the full player, and the activity starts with the user's rotation setting
on them. Phones and TV keep their existing rules.

Contributed by Keven Chantre in #807. Fixes #805.
2026-11-04 16:10:21 +07:00
zarzet 335ae95ff3 fix(android): keep media controls responsive during artwork reads 2026-11-04 02:25:16 +07:00
zarzet 8bca89936f feat(cast): Google Cast on iOS and desktop
- iOS: a Swift plugin drives the Rust sender on the existing cast
  channels. A silent mixable loop keeps the app serving audio while a
  session is connected. Audio output now opens the same sheet as
  Android, with AirPlay and Bluetooth opening the system route picker.
- Desktop: CastOutput talks to the Rust sender through the backend
  channel. Material shows a Cast button in the player bar that gives
  way after the volume slider in narrow windows; the Mornye capsule
  puts Cast in its volume popover.
- iOS and desktop pick receivers in a new app sheet that looks for
  devices while open and connects on tap.
- Android keeps Google's sender and dialog, and now serves media from
  the Rust server. The Dart CastMediaServer is removed.
2026-11-04 02:01:11 +07:00
zarzet 6e964bb2d3 feat(player): open audio files and folders directly 2026-11-04 01:35:52 +07:00
zarzet 5f369d77be fix(android): restore keyboard viewport after backgrounding 2026-11-04 01:17:58 +07:00
zarzet 6e07941b35 feat(library): save network songs offline with independent copies 2026-11-03 03:18:14 +07:00