Skip to content

Add Japanese UI, release-linked versioning, and synchronized MMD audio - #13

Merged
anyapipira merged 6 commits into
mainfrom
dev-ui-version-ja-docs
Aug 23, 2026
Merged

anyapipira merged 6 commits into
mainfrom
dev-ui-version-ja-docs

Conversation

@anyapipira

@anyapipira anyapipira commented Aug 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

This change makes AnyaDance releases identifiable from the UI, adds Japanese as a complete UI/documentation language, hardens localized layouts against overflow, and adds synchronized background-audio playback to MMD dances.

Release-linked UI version

  • Add an ANYADANCE_VERSION CMake setting and generate the UI version header during configuration.
  • Derive development-build labels from git describe --tags --always --dirty, with dev as the fallback when Git metadata is unavailable.
  • Pass github.ref_name from the release workflow so official builds display the exact GitHub release tag.
  • Show the version in both the Windows title bar and the UI footer, making installed binaries traceable to their release or source revision.
  • Document how release, development, and explicitly versioned custom builds obtain their visible version label.

Japanese UI and documentation

  • Add Japanese as a third selectable UI language alongside English and Simplified Chinese.
  • Translate the complete UI string table, including the MMD workflow and new BGM controls.
  • Merge a native Japanese Windows font into the existing CJK font atlas so kana, kanji, and Simplified Chinese glyphs remain available together.
  • Add Japanese versions of every document that already had a Simplified Chinese translation: the README, architecture, building, device model, installation, MMD dance, protocol, and troubleshooting guides.
  • Add English / Simplified Chinese / Japanese navigation links to each translated documentation set and stage the Japanese README with packaged builds.

Localized layout safety

  • Clip device-card text to each card's content bounds so long localized labels cannot draw over neighboring controls.
  • Wrap device names in compact mode and account for their measured height before drawing subsequent status text.
  • Position Y-limit warnings from their measured width instead of a fixed English-sized offset.
  • Measure wrapped mouse-help text and size its child region dynamically.
  • Shorten the HMD interaction hint consistently across all languages.

Synchronized MMD BGM playback

  • Add optional WAV, MP3, M4A, AAC, and WMA selection to the MMD dialog.
  • Decode audio through Windows Media Foundation and play it through XAudio2.
  • Enumerate active Windows render endpoints through Core Audio, provide an output-device selector and refresh action, and remember the selected endpoint in UI preferences.
  • Add a configurable audio start offset relative to motion frame zero and persist it across launches:
    • a negative offset starts the audio first and holds the first motion frame during the intro;
    • a positive offset starts the motion first and keeps audio silent until its configured start;
    • audio extending past the motion holds the final motion frame until the audio ends.
  • Drive motion and audio from one combined transport whose start is the earlier of motion frame zero and audio start, and whose end is the later of motion end and audio end.
  • Apply looping to that complete combined interval so intro/outro holds repeat correctly and motion never loops independently under unfinished audio.
  • Keep audio aligned during play, pause, resume, seek, offset changes, device changes, clip loading, stop/reset, and loop boundaries; material clock drift triggers a corrective seek.
  • Finish non-loop playback logically at the combined endpoint while leaving the final pose applied, allowing the next Play action to restart from the combined beginning.
  • Keep the audio backend recoverable when no endpoint exists at startup or when the endpoint list changes.

Implementation and safety

  • Keep combined-transport calculations in the platform-light core so offset, clamping, and looping behavior can be tested independently of Win32 audio APIs.
  • Limit decoded PCM data to 512 MiB and reject empty or incomplete decoded streams.
  • Avoid internal motion or audio looping; the shared transport is the single owner of loop timing.
  • Update the English, Simplified Chinese, and Japanese MMD guides with supported formats, offset semantics, endpoint selection, first/last-frame holds, and combined-loop behavior.

Verification

  • Built AnyaDanceUI in Release configuration.
  • Built anyadance_tests in Release configuration.
  • Ran ctest --test-dir build -C Release --output-on-failure: all tests passed.
  • Added core transport coverage for no-audio playback, negative-offset intros, positive-offset delays, audio outros, and combined looping.
  • Added a Windows audio smoke test that enumerates/selects an endpoint when available, generates and decodes a short PCM WAV, and validates its duration; endpoint-dependent checks skip cleanly on headless CI runners.
  • Existing localization row-count and UI-layout tests remain part of the full test run.

@anyapipira
anyapipira requested a review from Alitzlan August 23, 2026 04:01
Alitzlan
Alitzlan previously approved these changes Aug 23, 2026
@anyapipira
anyapipira merged commit b0d0e02 into main Aug 23, 2026
2 checks passed
@anyapipira
anyapipira deleted the dev-ui-version-ja-docs branch August 23, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants