Phase 3 updates

Phase 3 · Slice 5 ·

Audio, scenes and PlayerPrefs

  • Audio (tassix_audio: cpal output, symphonia decoding of WAV/Ogg/MP3/FLAC, own mixer with resampling and gain ramps; a manual 48 kHz clock when headless):
    • AudioSource with Unity's defaults and clamps: play on awake at once when enabled on an active object (even without a clip, which still reports isPlaying); assigning a clip stops; Play on a disabled source warns and does nothing; time reads 0 while stopped while timeSamples keeps a seek.
    • PlayOneShot, PlayDelayed/PlayScheduled, Pause/UnPause, PlayClipAtPoint; 2D balance blended with 3D log/linear rolloff by spatialBlend; AudioListener volume and pause.
    • AudioClip.Create with reader callbacks, GetData/SetData with wrap-around; clips from scene fields and Resources.
    • AnimationCurve (Hermite keys, wrap modes, Linear/EaseInOut/Constant).
    • audio_basic: 68 checks.
  • SceneManager:
    • Scenes from a build_settings.json beside the first scene; LoadScene/LoadSceneAsync by name or index, Single and Additive; allowSceneActivation holds an async load at 0.9.
    • Loads and unloads run at the start of the next frame, so loaded objects Awake, OnEnable and get sceneLoaded first, then Start before that frame's Update, as recorded in Unity.
    • A Single load destroys every other scene's objects before reporting each sceneUnloaded; unloading the active scene hands activity to the first other loaded scene at once.
    • CreateScene, MoveGameObjectToScene, MergeScenes, SetActiveScene, GetSceneBy*, DontDestroyOnLoad; GameObject.scene; invalid scenes have a null name.
    • scene_management: 130 checks, with probes in real Unity scenes the recorder writes before play mode.
  • PlayerPrefs in a JSON file under Application.persistentDataPath (typed entries; reading another type returns the default); player_prefs: 23 checks. Application paths, Quit (wantsToQuit, quitting) and logMessageReceived.
  • Fixes: Transform rotation setters normalize as Unity's do; a slowly lengthening quaternion from repeated world-space Rotate had been scaling objects and their colliders, and PhysX rejected the static actor rebuilt from it. Poses passed to PhysX are normalized too.
  • Sample: Coin Dash (coin_dash/): a menu and a level switched with SceneManager, synthesized sounds, music kept with DontDestroyOnLoad and a best time in PlayerPrefs; an MCP e2e test plays through the switch.
  • Next: Phase 4 (project import and the editor); the score UI waits for uGUI (Phase 5).