The audio library builds without C++ exceptions since the size build,
so a std::vector that could not allocate ended the process, where it
used to fail the song with a Java exception.
The FLAC block, the exclusive output ring and the DSD read buffers use
PcmBuffer, which allocates without throwing and reports failure:
decoding fails with "Cannot allocate FLAC block" and the JNI calls
throw IllegalStateException as before.
With this and the speed level the arm64 library is 446.4 KB, against
441.6 KB after the size build and 490.1 KB before it.
The size build compiled all of libmornye_audio.so with -Os. libFLAC
and the app's own sample loops go back to -O2, the level release
builds used before. At -Os FLAC decoding was 4 percent slower (241 ms
against 232 ms for a minute of 192 kHz audio on the build machine) and
the conversion loops were no longer vectorized: int32 to float ran
5.7 times slower, the DSD byte narrowing 11.7 times.
WavPack and Oboe stay at -Os; DSD decoding measured the same at both
levels.
Button groups, the playback transport and the mode toolbar squish on the
fast spatial spring through AppMotion, so Animation speed and Reduce
Motion apply. The seek bar wave grows on the effects spring and fades out
on its leaving curve.
Leaving motion used ad hoc ease curves and fixed durations. Mornye exits
now use its fast spring (from the current velocity where a controller
drives them) and Material exits use the standard accelerate curve, paced
by Animation speed: dialogs, the desktop inspector and now playing pane,
queue row removal, the selection bar, the Mornye snack bar, desktop page
pops, the recognition switcher and the theme change.
Material dialogs always take the app's dialog route, which shows at once
under Reduce Motion.
Material without a mini player morph now opens and closes on its
critically damped full-screen spring like Mornye, instead of a fixed
emphasized curve. A cancelled drag settles back on the same spring and
jumps straight to rest under Reduce Motion.
MornyeMotion gains glassPress and glassMorph springs, so the glass press,
the folding tab bar and the pouring context menu share one tuned spring
each instead of private constants, and follow Animation speed. The menu
opening now runs on the glassMorph curve over the route's progress.
AppMotion.surfaceEntrance also covers Mornye sheets and menus (slow spring
in, fast spring out), gives Material a fastest-first exit curve and turns
the transition off under Reduce Motion.
Home gains a "Recommended for you" shelf in both styles, after Recently
added: songs the person does not have that resemble the ones they play
most, added last and loved.
The songs come from the machinery behind "Suggested songs": an extension
that suggests related songs, else a metadata provider searched by artist.
Three seeds are taken from a pool of up to 45 Library songs, and each day
starts from other songs of the pool. One request is made per day; the
answer is kept for the day, and a failed request falls back on the last
day's songs. Songs already in the Library are left out when the shelf is
shown, so a recommended song leaves it once downloaded. Seeds from files
carry no ID, since a file's ID may be its path.
As on search results, a tap downloads the song and a long press or a right
click opens its actions; a song with a preview has a preview button on its
cover. The shelf is absent while it has nothing to show.
Appearance > Layout has a switch for the shelf, on by default.
loadCollectionSuggestions takes the number of songs to return.
Home showed either the chosen extension's feed or the person's own
sections, never both, so anyone with a feed extension lost the
shortcuts, mixes and Library shelves, and the Material Home also carried
the search field.
Home is now the person's own page in both styles and never asks for a
feed. Search is a destination in both styles (Home, Library, Store,
Search, Settings; Mornye phones keep Settings as a page) and opens on
the feed before anything is typed. Recent searches wait for the field
while a feed fills the page; a tap beside the empty field, Back, or the
Search destination pressed again returns to the feed. Without a feed
Search opens on recent searches, and with neither a provider nor a feed
it shows the provider prompt under the field. The Mornye bar's search
button opens the feed first and focuses the field when pressed on
Search, or at once when there is no feed. The Mornye desktop Search page
keeps its recents row and Browse tiles.
Both styles now share one destination order, so the search tab flag of
the shell navigation service and the style argument of the tab order
helpers go. The Material rail and Cmd/Ctrl+1..5 gain Search.
With an empty Library and nothing played, Home says so in both styles
and offers a "Find music" button that opens Search; the Library's empty
state on Mornye leads there too. The feed setting is renamed from Home
feed to Search feed (English and Indonesian; other languages keep the
old wording until translated). The feed no longer repeats the greeting
or Top Picks, which Home already shows.
Every job that analyzes, tests or builds runs scripts/gen_l10n.dart
after pub get. Release builds of iOS, macOS, Linux and Windows are
obfuscated as Android already was, and their symbol files are kept as
artifacts for 90 days. iOS builds pass MORNYE_MOBILE.
macOS releases one DMG per architecture (arm64 and x64) instead of a
universal one; the in-app updater already picks an architecture-named
DMG. The unsigned IPA loses the assets iOS never loads and is zipped
at the highest level.
- FFmpeg ships as shared libraries beside ffmpeg and ffprobe instead
of two static programs that each carried every codec: the
lgpl-shared builds on Windows and Linux (RUNPATH $ORIGIN on Linux)
and a shared build on macOS without video decoders the app does not
need.
- Bundles leave out assets the platform never loads: web helper
files, glass shaders of other renderers and the licenses of
Android-only libraries. The Skia glass shaders stay, as Linux runs
without Impeller on NVIDIA.
- Runners compile for size, and Linux strips its libraries except
libapp.so and the Flutter engine.
- Tighter compression: zstd for the AppImage, xz for the deb, LZMA2
ultra for the installer, the highest zip level, and no .pdb or
import libraries in the Windows zip.
- package_macos_dmg.sh packages a single architecture on request.
Untested here: needs a desktop build on each platform.
Release configurations of the iOS and macOS runners and of their pods
compile for size (-Osize, -Os), use thin LTO, strip dead code and
strip symbols after linking. Pods keep their global symbols: both
Podfiles build them as dynamic frameworks, whose classes the app
links against.
Untested here: no iOS or macOS release build ran with these settings.
Desktop runs the bundled ffmpeg and ffprobe programs, and the Dart
side only calls FFmpegKit on phones. macOS and Linux still registered
and linked the plugin, unlike Windows. The patched package no longer
declares those two platforms and the generated registrants follow.
The build scripts compile the bundled SQLite without the subsystems
the backend never calls (FTS3, R-Tree, math functions, extension
loading, UTF-16, shared cache, deprecated entry points) on every
platform. FTS5 with the trigram tokenizer, JSON, WAL and triggers
stay. C code builds with hidden visibility, libusb included, and for
size on Android.
SQLite stays bundled on Apple platforms as well: rusqlite 0.43 calls
sqlite3_set_clientdata (SQLite 3.44), which the system library of
iOS 16 and macOS 12 does not have.
build_rust_backend.sh builds a single macOS architecture with
MORNYE_MACOS_ARCH and strips local symbols from the desktop libraries.
Release builds use opt-level "s" with fat LTO. On Android arm64 the
backend library goes from 20.9 MB to 17.3 MB.
CPU-bound code keeps opt-level 3: the mobile and core crates and the
FLAC and image decoders. At "s" the Direct USB resampler ran six times
slower (251 ms against 40 ms for ten seconds of audio on the build
machine, with the same output) and the cover and Hi-Res tests took
longer (0.09 s against 0.05 s, 0.90 s against 0.76 s). Keeping these
fast costs 0.44 MB.
Dependencies are trimmed: zip inflates with the flate2 backend the
tree already links, rustls-pemfile gives way to the PEM parser of
rustls-pki-types, and regex drops the engines the app can do without.
Its lazy DFA stays for 0.09 MB, as log redaction ran fifty times
slower without it (60 against 1.1 microseconds a line).
The desktop library speaks its own C ABI but linked the mobile crate
with all of its UniFFI scaffolding. mornye-mobile gains a default
`uniffi` feature that owns the scaffolding and the mobile bridges to
the Cast sender and the Link server, and the desktop crate turns it
off. The generated Kotlin and Swift bindings are byte-identical.
The phone's Link server never transcodes (it passes no ffmpeg path),
so mornye-link gains a default `transcode` feature that the mobile
crate leaves off, and tokio's process support stays out of the phone
library. The two ffmpeg tests need that feature.
libmornye_audio.so builds with -Os, hidden visibility, section garbage
collection and thin LTO, without C++ exceptions and RTTI. JNI entry
points stay exported through native_audio.map.
With exceptions off, the FLAC source returns its errors instead of
throwing them. Running out of memory for a decoded block now ends the
process where it used to fail the song.
FLAC decoding measured 3 to 6 percent slower and stays far above real
time (about 230 times); the decoded samples are bit-identical.
- Resource tables keep the app's 13 languages (localeFilters);
libraries shipped strings for every language Android knows.
- Assets Android never loads stay out: the desktop and merged-surface
glass shaders and media_kit's web player script. The Copy task
filter that did part of this had stopped matching, as Flutter 3.50
copies assets with its own task type; ignoreAssetsPattern does it.
- Kotlin metadata, version stamps and build metadata files are left
out of the package. Nothing in the app uses Kotlin reflection.
- R8 keeps the generated UniFFI library interface, its structures and
its callbacks instead of every class of com.mornye.backend.
- The scheduled-notification receivers of flutter_local_notifications
go: the app only shows immediate notifications.
- Gradle adds MORNYE_MOBILE=true to the Dart defines of every build,
and ABI splits switch off for bundle tasks.
The Mornye warm-up loaded every shader liquid_glass_easy ships, with
the metaball programs of its Blender and Morph widgets, which the app
never mounts. ensureLensLoaded loads the lens programs alone, so the
unused shader files can also leave the packages.
Concert times need current zone rules only. latest_10y.dart covers
five years either side of the package's release instead of every rule
change on record, which upcoming concert dates never leave.
isDesktopPlatform is only known at run time, so phone builds carried
the desktop player engine, the desktop diagnostics and the Windows
folder lookup. With --dart-define=MORNYE_MOBILE=true it is a
compile-time false and the compiler drops what only desktop reaches.
Android and iOS release builds pass the define.
Three call sites reached desktop code without asking
isDesktopPlatform; they ask now. Without the define (desktop builds,
tests) nothing changes.
The license page read assets/licenses/lgpl-3.0.txt, a byte-for-byte
copy of the LICENSE file the bundle already carries, and reads LICENSE
now. NOTICE was bundled but never read by the app, so it leaves the
bundle too. Both files stay in the repository.
Chinese lyrics showed no pinyin on Android. With Flutter 3.50 the
Android build passes Flutter assets through the Android asset merger,
which unpacks a file ending in .gz and drops the extension. The APK
held assets/romanization/pinyin.txt, the app asked for pinyin.txt.gz,
and the missing asset left romanization off without an error.
The file is now assets/romanization/pinyin.bin, still gzipped inside,
which the merger leaves alone. On an emulator the same lyric file shows
no pinyin in the build before this change and pinyin after it.
The pinyin table of offline romanization was gzipped text, 259 KB. The
same readings, phrases and traditional pairs now use a binary layout:
code points delta-coded and grouped by reading, phrases front-coded
with only the syllables that differ from a character's usual reading.
It takes 157 KB.
PinyinData.decode reads both formats and build_pinyin_data.dart gains
--repack to convert an existing file. Every character and phrase reads
as before (44369 characters and 9522 phrases compared).
Inter goes from 880 KB to 433 KB: the optical size axis is pinned (the
app never sets it and Flutter does not apply it by itself), weights run
from 400 to 900 and the private-use alternates go. Every character
Inter draws stays, since song titles, artists and lyrics are user text.
Google Sans Flex goes from 572 KB to 281 KB with all its characters:
width is pinned at 100 and weights run from 400 to 900, the range the
app uses. ROND stays variable.
Both files come from scripts/optimize_fonts.py.
material_symbols_icons ships whole icon fonts and relies on Flutter's
icon tree shaker, which left 334 KB of the Rounded font in the APK.
third_party/mornye_symbols holds that font cut down to the 253 symbols
lib/theme/material_symbols.dart names, with the upstream code points
and the FILL and opsz axes; it takes 71 KB in the APK.
scripts/optimize_fonts.py regenerates the package from the upstream
one after an icon is added.
flutter gen-l10n wrote a class for each of the 21 ARB files, and every
class repeated the English text of each message its language has not
translated. The app only offers the 13 languages of
supported_locales.dart.
scripts/gen_l10n.dart writes those 13 only. Each language class extends
the English one and overrides just the messages whose text differs, and
the bare es, pt and zh classes are left out where only a country
variant ships. For the 13 languages every message resolves to the same
text as before (compared across all 2989 messages).
Flutter no longer generates the files: l10n.yaml is gone and pubspec
sets generate: false, because a root l10n.yaml makes every build run
Flutter's own generator. Run `dart scripts/gen_l10n.dart` after ARB
changes and once in a new checkout; build_android.sh does it too. The
script also drops the records of earlier Flutter-generated outputs from
.dart_tool, which made the next build delete the files as stale.
locale_config.xml lists the same 13 languages for Android's per-app
language setting. The Arabic layout test brings its own delegate, as
the app ships no right-to-left language. build_android.sh also passes
MORNYE_MOBILE, which a later commit reads.
Since cf68a7d94 the Resume card asks History and the Library whether
the saved song is a scanned one while Local Library is off, which is
the default. The two runtime tests read the card with default settings
and the real download History, which never opens in a unit test, so
both waited until the two minute timeout. Give their containers
settings with Local Library on; the filter has its own tests in
playback_session_restore_test.
The fade test taps the first row that is not Appearance, which is the
profile row. The profile page now shows a loading indicator until its
listening overview has loaded, which never happens in this test, so
pumpAndSettle timed out in Material. Leave the profile row out: the
test is about moving between categories.
The Files settings list is built lazily. The folder cover and motion
cover rows added above it pushed the folder template row out of the
part a phone sized window builds, so ensureVisible found no element.
Scroll until the row exists instead.
13a2d9c73 rebuilt the track details header and moved the cover code
from the cards part to the header part. The source check still read the
cards part and looked for the old one line cover helper. Read the
header part and match the call it makes now.
The group of tests against the real backend library is skipped unless
the library path is set. Its symlink test passed "skip: false" on every
platform but Windows, which overrides the group and ran it without a
library. Pass null there so the group decides.
The cover store names a fetched cover by its hash. Since ab7157aa0 the
hash goes over the backend channel first and falls back to Dart only on
a MissingPluginException. This file never initialized the test binding,
so the channel call threw another error, the fetch counted as failed
and the test met a null path.
The rollback test builds a cut down version 14 Library table. The
upgrade to version 21 creates the album key and album artist indexes
again, and the fixture had neither column, so the retry failed with
"no such column: album_key". A real version 14 database has both since
version 7.
The Library hides a scanned song that a download already holds, and
since 6e07941b3 that check also reads history.origin_file_path. Five
test fixtures build the History table by hand without that column, so
every Library read in them failed with "no such column:
offline.origin_file_path". The CUE split fixture had no History table
at all and failed with "no such table: history_db.history".
Add the column to the search, paging, directory entries and Windows
path key fixtures, and a minimal History table to the CUE split test.
The file size test uses the paging fixture and passes again with it.
The logo on the About page, in setup and on the Rewind card is decoded
at the size it is shown. Split artist names are remembered for the 512
most recent credits, and the release year pattern and the desktop
inspector blur are built once.
The equalizer curve lays its gain labels out once per paint, draws the
0 dB dashes as one path and paints in its own layer. The equalizer, the
spectrogram, the Hi-Res report and the compare chart release their text
painters after use, the spectrogram also repaints when its label or grid
colour changes, and the compare timeline paints in its own layer.
The fast scroller moves its thumb through a listenable in a layer of its
own and rebuilds fully only when it appears or goes. Drag select runs
its auto scroll ticker only while the finger is in an edge band. Pinned
section lists compare their header positions by value and lay a header
out again only when the list did not, the staggered reveal takes its
cheap exits first, and the Hi-Res batch sheet builds its rows lazily.
The press spring of the selection pill no longer rebuilds the whole
pill: the resting pill, the lens and the bar listen to the controllers
they need, and the lens leaves the tree at rest. The bottom bar measures
its label once per text style, keeps the mini player in its own layer
and skips the header lookup while the tabs are already shown. Hidden
tabs keep their last padding, the glass preparation steps aside once it
has run, album surfaces on the artist page read one colour instead of a
whole scheme, and the Library asks for more rows only when there are
more.
Material album, playlist and local album headers decoded their blurred
backdrop at full cover size. It now uses the small decode the track
details backdrop already has. The stretch of the header artwork rebuilds
only while the list is pulled past its start, header title heights are
remembered, the quality the songs of an album share is worked out once
per song list, and the collapsing header reads its expanded height once
per layout change instead of on every scroll report.
The Explore, featured and recent shelves give their lists the card width
up front, so a shelf lays out only the cards on screen. Sorted album and
playlist results are remembered per result list, and the Continue
listening progress stops following the position while Home is hidden.
Adding many songs to the queue inserted them one by one and renumbered
the play history after each. They now go in with one insert. The haptics
update returns early while haptics are off, and a media item gets its
playback instance when it is built instead of through a second copy.
The mini player progress, the compact bar, the playback controls and the
lyric preview rebuilt on every position report while they were hidden.
They now read the position once while their tickers are off and watch it
again when shown. The mini player warms the motion artwork in a leaf of
its own, the landscape player rebuilds only its shell on play and pause,
the lyrics options button watches the settings it uses, and the word
sweep paints in its own layer with one glow filter.
The sync runner and the watcher of kept collections listened to every
collections change for the app's lifetime. Both now listen only while a
client is set, the watcher also only while something is kept. A new
connection still starts a full pass. The cover of the song a computer
plays is looked up without blocking the UI thread.
The Library scan progress was parsed on the main thread on every poll,
also when nothing had changed. It is now compared and parsed on the IO
dispatcher. Closing a playback lease and asking a document's type before
opening or sharing it moved off the main thread as well.
The view of visible Library rows ran its Windows duplicate check and its
split CUE check for every row. One test per query now skips each check
when no such rows exist, and the duplicate check joins in a fixed order.
The view is recreated on open while it still has the old text. Listening
statistics get an index on the album name, and the temporary table of
downloaded Library files is renamed into place instead of being copied.
Saving the explicit or lyrics flag, reading a file's audio details and
changing an album cover each reloaded the lookup index and the scan
summary. None of them changes a song's name, ISRC or folder, so the
provider now only announces the change and the lists read their rows
again.
Adding songs to a playlist first read and decoded every song already in
it. A playlist that is not loaded now only gains the new keys and stays
unloaded: its songs are read when it is opened, and a load already under
way starts over because the keys changed. The loved keys and the keys of
all playlists are updated in place instead of being rebuilt from every
list. Playlist songs get an index on (playlist_id, added_at), the order
they are read in, in place of the index on playlist_id alone.
Resolving a finished download and looking a file up by its path walked
the whole history and built the path keys of every entry each time. The
state now builds an id index and a path key index on first use, and
carries both over when a download is added.
One counter made every visible cover in the Library rebuild whenever a
single embedded cover was extracted. EmbeddedCoverVersions keeps the
listeners by file, so a new cover reaches the rows of that file only,
and it hands the cover resolver one callback per file instead of a new
closure on every build.
The fade of a decoded local cover drops its backdrop once it is over,
and the cover warm-up decodes by width alone, as the grid cell does, so
the cell reuses what was warmed. The Library remembers its playlist
order and its artist and genre sections between builds, and a cover file
found on disk is trusted for 30 seconds before it is looked at again.