feat: Add new audio hub implementations and associated tests - #16
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Unity “Radio” package from a monolithic AudioPlayerCore + AssetsRegistry-based design into a set of composable IAudioHub<T> implementations (single-channel, multi-channel rotation, LitMotion cross-fade, Addressables wrappers, and composite volume control), along with a refreshed runtime test suite and updated documentation.
Changes:
- Introduces new
IAudioHub<T>-based runtime components (SingleChannelAudioHub,MultiChannelsAudioHub,InteractiveAudioHub, Addressables wrappers, andCompositeVolumeAudioHub). - Replaces/removes the legacy
AudioPlayerCoreimplementation and its play mode tests with focused hub-level tests and supporting test utilities/providers. - Removes the AssetsRegistry dependency and updates Unity package manifests/locks and docs to reflect the new composition model.
Reviewed changes
Copilot reviewed 42 out of 54 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Radio.Unity/Packages/packages-lock.json | Removes AssetsRegistry package lock entries / dependency wiring. |
| src/Radio.Unity/Packages/manifest.json | Removes AssetsRegistry from Unity project manifest dependencies. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/ThrowHelperTests.cs | Adds tests for volume guard behavior. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/ThrowHelperTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/SingleChannelAudioHubTests.cs | Adds tests for SingleChannelAudioHub. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/SingleChannelAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/MultiChannelsAudioHubTests.cs | Adds tests for MultiChannelsAudioHub. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/MultiChannelsAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/InteractiveAudioHubTests.cs | Adds LitMotion-gated tests for InteractiveAudioHub. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/InteractiveAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/InMemoryAudioClipProvider.cs | Extends the in-memory Addressables provider for delayed/failing load + release tracking. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/CompositeVolumeAudioHubTests.cs | Adds tests for composite volume grouping + builder behavior. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/CompositeVolumeAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/CachedAddressableAudioHubTests.cs | Adds tests for retained-handle Addressables wrapper behavior. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/CachedAddressableAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AddressableAudioHubTests.cs | Adds tests for per-request Addressables wrapper behavior + shared test base. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AddressableAudioHubTests.cs.meta | Unity metadata for new test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AudioHubTestUtility.cs | Adds shared test helpers and a recording hub implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AudioHubTestUtility.cs.meta | Unity metadata for new test utility script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/Radio.Runtime.Tests.asmdef | Removes AssetsRegistry assembly reference from runtime tests asmdef. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AudioPlayerCoreTests.cs | Removes legacy AudioPlayerCore play mode tests. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Tests/Runtime/AudioPlayerCoreTests.cs.meta | Removes Unity metadata for deleted test script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/ThrowHelper.cs | Adds centralized volume guard helper. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/ThrowHelper.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/IAudioHub.cs | Adds the IAudioHub<T> interface that hubs implement. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/IAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/SingleChannelAudioHub.cs | Adds single-source one-shot hub implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/SingleChannelAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/MultiChannelsAudioHub.cs | Adds multi-source rotating playback hub implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/MultiChannelsAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CompositeVolumeAudioHub.cs | Adds composite volume coordinator + builder API. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CompositeVolumeAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CallerArgumentExpressionAttribute.cs | Adds CallerArgumentExpression polyfill for older TFMs. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CallerArgumentExpressionAttribute.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AddressableAudioHub.cs | Adds Addressables wrapper hub that loads/releases per request. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AddressableAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/CachedAddressableAudioHub.cs | Adds cached Addressables wrapper hub with Dispose-based release. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/CachedAddressableAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AsyncOperationHandleEqualityComparer.cs | Adds comparer for AsyncOperationHandle dictionary keys. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AsyncOperationHandleEqualityComparer.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables.meta | Unity metadata for new Addressables external folder. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/LitMotion/InteractiveAudioHub.cs | Adds LitMotion-gated interactive cross-fade hub implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/LitMotion/InteractiveAudioHub.cs.meta | Unity metadata for new runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/LitMotion.meta | Unity metadata for new LitMotion external folder. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External.meta | Unity metadata for new External folder. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/AudioPlayerCore.cs | Removes legacy AudioPlayerCore implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/AudioPlayerCore.cs.meta | Removes Unity metadata for deleted runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/AudioPlayerCore.Interactive.cs | Removes legacy LitMotion-enabled partial AudioPlayerCore implementation. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/AudioPlayerCore.Interactive.cs.meta | Removes Unity metadata for deleted runtime script. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/Radio.asmdef | Adds Addressables version define and removes AssetsRegistry assembly reference. |
| src/Radio.Unity/Packages/jp.andantetribe.radio/package.json | Removes Addressables/AssetsRegistry dependencies from the package manifest (keeps UniTask). |
| src/Radio.Unity/.gitignore | Ignores CodeCoverage and TestResults outputs. |
| README.md | Updates documentation to describe composable hubs and new usage patterns. |
| README_JA.md | Japanese documentation updates mirroring README.md changes. |
Files not reviewed (12)
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CallerArgumentExpressionAttribute.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/CompositeVolumeAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AddressableAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/AsyncOperationHandleEqualityComparer.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/Addressables/CachedAddressableAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/LitMotion.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/External/LitMotion/InteractiveAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/IAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/MultiChannelsAudioHub.cs.meta: Generated file
- src/Radio.Unity/Packages/jp.andantetribe.radio/Runtime/SingleChannelAudioHub.cs.meta: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.