)]}'
{
  "commit": "c4e0646edcf4a6b53257c2ce8d521041074d20b0",
  "tree": "7d0e657b4f08d253a24f8dd5fab7c9e1aecfd2b3",
  "parents": [
    "5c727ffb68b7d018b67c77ce5f74c31bab580d43"
  ],
  "author": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Wed Feb 14 13:20:46 2024 +0000"
  },
  "committer": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Wed Feb 14 13:20:46 2024 +0000"
  },
  "message": "Audio for Unity\n\nThis was quite the convoluted process and did not get implemented quite as expected, but it I eventually got to a solution which I think is good.\n\n- I originally looked at using the [Native Audio Plugin SDK](https://docs.unity3d.com/Manual/AudioMixerNativeAudioPlugin.html) but that was wildly incompatible with a graphics native plugin 🫠\n- Then I found the [AudioClip API](https://docs.unity3d.com/ScriptReference/AudioClip.Create.html) which has a PCMReaderCallback! It worked but it had a ton of latency (like you\u0027d hear things half a second delayed).\n  - I decreased the sample frame size, no change.\n  - I lowered the DSP buffer size in Unity, no change.\n  - Finally found [this post](https://forum.unity.com/threads/audioclip-pcmreadercallback-has-insane-latency.1022065/) that confirmed what I was seeing.\n- That led me to the OnAudioFilterRead callback, which finally respects the DSP buffer size setting. Now there\u0027s no audible delay! Hover events with audio work great!\n\nWhat\u0027s cool about this is that you can inject a different AudioEngine per artboard (nested artboards inherit it) or you can share one. Separating them means that the AudioSource (if you use one instead of an AudioListener on a camera) will have spatial audio! So you\u0027ll hear the Audio from the artboard fade away as you walk away from whatever GameObject you attach the script to.\n\nDiffs\u003d\n61f553d6d Audio for Unity (#6606)\n\nCo-authored-by: Luigi Rosso \u003cluigi-rosso@users.noreply.github.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "92d5321da6a9f5a5ad702145020ab153c5ed8964",
      "old_mode": 33188,
      "old_path": ".rive_head",
      "new_id": "44802f14d4a3929c334a3f96d2083f37b73cd6c1",
      "new_mode": 33188,
      "new_path": ".rive_head"
    },
    {
      "type": "modify",
      "old_id": "183cfdcecc406cf5351ddafec36538f24b56d8ae",
      "old_mode": 33188,
      "old_path": "dependencies/premake5_miniaudio.lua",
      "new_id": "a83cc41a77bcca0fcbe0703ca65a8cdb114e879a",
      "new_mode": 33188,
      "new_path": "dependencies/premake5_miniaudio.lua"
    },
    {
      "type": "modify",
      "old_id": "c26613493d4ceed74d54592caeaed9a8cfda0d45",
      "old_mode": 33188,
      "old_path": "dependencies/premake5_miniaudio_v2.lua",
      "new_id": "b193cb87d76e0449b65377c553be0df7cd497098",
      "new_mode": 33188,
      "new_path": "dependencies/premake5_miniaudio_v2.lua"
    },
    {
      "type": "modify",
      "old_id": "6fe3baa1bb16934e99f6735cdd0df837b25285b5",
      "old_mode": 33188,
      "old_path": "include/rive/artboard.hpp",
      "new_id": "a110e0f7d4dea6b257919e838d78426a1c07a399",
      "new_mode": 33188,
      "new_path": "include/rive/artboard.hpp"
    },
    {
      "type": "modify",
      "old_id": "b84a13fab5e53584a45ab1f839e04ec528544e2f",
      "old_mode": 33188,
      "old_path": "include/rive/audio/audio_engine.hpp",
      "new_id": "de7b21d43b1a0f41e691e280a851db83bc7441df",
      "new_mode": 33188,
      "new_path": "include/rive/audio/audio_engine.hpp"
    },
    {
      "type": "modify",
      "old_id": "0aa29a35c238ba899680fd945a9e549d96b0052e",
      "old_mode": 33188,
      "old_path": "src/artboard.cpp",
      "new_id": "6f18718b2d31b7ef6f53c4c2125720b8a9446507",
      "new_mode": 33188,
      "new_path": "src/artboard.cpp"
    },
    {
      "type": "modify",
      "old_id": "d99fb61734cb6826fc3f63782dc83f70dfb09cf4",
      "old_mode": 33188,
      "old_path": "src/audio/audio_engine.cpp",
      "new_id": "c85eee17bda5f46577ef85ce011b8f4b3fa7c1f7",
      "new_mode": 33188,
      "new_path": "src/audio/audio_engine.cpp"
    },
    {
      "type": "modify",
      "old_id": "3a6ead5360426febea26636cf9d980036e644e13",
      "old_mode": 33188,
      "old_path": "src/audio_event.cpp",
      "new_id": "8ea32c675ce921ef596a721ceb73c6ee238c3386",
      "new_mode": 33188,
      "new_path": "src/audio_event.cpp"
    }
  ]
}
