Conversation
# Conflicts: # Packages/AudioConductor/CHANGELOG.md # Packages/AudioConductor/package.json
There was a problem hiding this comment.
Pull request overview
This PR releases AudioConductor v2.4.0, adding a CueSheet-level authored sample-rate (referenceSampleRate) to prevent sample-index drift when clips decode at a different frequency, and improving WebGL behavior by auto-pausing/resuming playback on tab visibility/focus changes (plus fixing an edge case where Pause/Resume occurs immediately after Play).
Changes:
- Add
CueSheet.referenceSampleRateand runtime sample-index conversion inAudioClipPlayer.Setup(...). - Implement WebGL system pause/resume propagation (JS visibility listener →
ConductorBehaviour→Conductor→AudioClipPlayer). - Add editor UI + migration/validation/docs + tests covering reference sample rate and pause/resume edge cases.
Reviewed changes
Copilot reviewed 28 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Packages/AudioConductor/Tests/Editor/Core/Tools/CueSheetEditor/Models/CueSheetParameterPaneModelTests.cs | Adds tests for applying/validating referenceSampleRate from clip frequencies (with cleanup of created AudioClips). |
| Packages/AudioConductor/Tests/Editor/Core/AudioClipPlayerWebGLTests.cs.meta | Unity meta for new WebGL-specific test file. |
| Packages/AudioConductor/Tests/Editor/Core/AudioClipPlayerWebGLTests.cs | Adds WebGL-only tests for PauseBySystem/ResumeBySystem behaviors and scheduling adjustments. |
| Packages/AudioConductor/Tests/Editor/Core/AudioClipPlayerTests.cs | Extends tests for Pause/Resume edge cases and reference-sample-rate scaling during Setup. |
| Packages/AudioConductor/Runtime/Plugins/WebGL/AudioConductorWebGL.jslib.meta | Unity plugin importer meta for WebGL JS library. |
| Packages/AudioConductor/Runtime/Plugins/WebGL/AudioConductorWebGL.jslib | Adds JS visibilitychange hook + document.hidden query functions for WebGL builds. |
| Packages/AudioConductor/Runtime/Plugins/WebGL.meta | Folder meta for Runtime/Plugins/WebGL. |
| Packages/AudioConductor/Runtime/Plugins.meta | Folder meta for Runtime/Plugins. |
| Packages/AudioConductor/Runtime/Core/Models/CueSheet.cs | Introduces referenceSampleRate field and documentation in the runtime CueSheet model. |
| Packages/AudioConductor/Runtime/Core/ConductorBehaviour.WebGL.cs.meta | Unity meta for WebGL-specific ConductorBehaviour partial. |
| Packages/AudioConductor/Runtime/Core/ConductorBehaviour.WebGL.cs | Adds WebGL runtime system-pause notification integration (visibility/focus handling). |
| Packages/AudioConductor/Runtime/Core/ConductorBehaviour.cs | Makes ConductorBehaviour partial to support WebGL-specific partial implementation. |
| Packages/AudioConductor/Runtime/Core/Conductor.WebGL.cs.meta | Unity meta for WebGL-specific Conductor partial. |
| Packages/AudioConductor/Runtime/Core/Conductor.WebGL.cs | Adds WebGL-only OnSystemPause propagation to players. |
| Packages/AudioConductor/Runtime/Core/Conductor.Playback.cs | Passes cueSheet.referenceSampleRate into AudioClipPlayer.Setup(...) for scaling. |
| Packages/AudioConductor/Runtime/Core/AudioConductorWebGLBroadcaster.cs.meta | Unity meta for WebGL broadcaster. |
| Packages/AudioConductor/Runtime/Core/AudioConductorWebGLBroadcaster.cs | Implements a single JS visibility listener shared across ConductorBehaviour instances. |
| Packages/AudioConductor/Runtime/Core/AudioClipPlayer.WebGL.cs.meta | Unity meta for WebGL-specific AudioClipPlayer partial. |
| Packages/AudioConductor/Runtime/Core/AudioClipPlayer.WebGL.cs | Adds system pause/resume logic and scheduling behavior for WebGL. |
| Packages/AudioConductor/Runtime/Core/AudioClipPlayer.cs | Adds sample conversion in Setup, Play-schedule delay constant, and fixes Pause/Resume “scheduled-but-not-playing yet” edge cases. |
| Packages/AudioConductor/package.json | Bumps package version to 2.4.0. |
| Packages/AudioConductor/Editor/PackageResources/Uxml/CueSheetParameterPane.uxml | Adds Reference Sample Rate read-only field, warning helpbox, and Apply button to CueSheet parameter pane. |
| Packages/AudioConductor/Editor/Localization/JapaneseTranslations.cs | Adds JP translations for reference sample rate UI and migration strings; formats existing long entry. |
| Packages/AudioConductor/Editor/Localization/EnglishTranslations.cs | Adds EN translations for reference sample rate UI and migration strings; formats existing long entry. |
| Packages/AudioConductor/Editor/Core/Tools/Validation/Rules/ReferenceSampleRateUnsetRule.cs.meta | Unity meta for new validation rule. |
| Packages/AudioConductor/Editor/Core/Tools/Validation/Rules/ReferenceSampleRateUnsetRule.cs | Adds validation warning when referenceSampleRate is unset but clips exist. |
| Packages/AudioConductor/Editor/Core/Tools/Shared/ReferenceSampleRateBuildPreprocessor.cs.meta | Unity meta for new build preprocessor. |
| Packages/AudioConductor/Editor/Core/Tools/Shared/ReferenceSampleRateBuildPreprocessor.cs | Adds build-time warnings when CueSheets with clips have unset referenceSampleRate. |
| Packages/AudioConductor/Editor/Core/Tools/Shared/CueSheetAssetImportChecker.cs | Adds editor-time migration dialog to apply reference sample rates from clip frequencies. |
| Packages/AudioConductor/Editor/Core/Tools/CueSheetEditor/Views/CueSheetParameterPaneView.cs | Wires new UI controls (read-only display, warning visibility, apply action). |
| Packages/AudioConductor/Editor/Core/Tools/CueSheetEditor/Presenters/CueSheetParameterPanePresenter.cs | Binds ReferenceSampleRateObservable to view and wires Apply button to model action. |
| Packages/AudioConductor/Editor/Core/Tools/CueSheetEditor/Models/ObservableCueSheet.cs | Adds observable property wrapper for referenceSampleRate. |
| Packages/AudioConductor/Editor/Core/Tools/CueSheetEditor/Models/Interfaces/ICueSheetParameterPaneModel.cs | Extends interface with reference sample rate observable + apply capability. |
| Packages/AudioConductor/Editor/Core/Tools/CueSheetEditor/Models/CueSheetParameterPaneModel.cs | Implements apply logic with undo/redo + frequency consistency checks. |
| Packages/AudioConductor/CHANGELOG.md | Adds v2.4.0 changelog entry matching PR description. |
| docs/README.md | Documents reference sample rate concept, migration dialog, UI, and validation warning. |
| docs/README_JA.md | Japanese documentation for reference sample rate concept, migration dialog, UI, and validation warning. |
Files not reviewed (9)
- Packages/AudioConductor/Editor/Core/Tools/Shared/ReferenceSampleRateBuildPreprocessor.cs.meta: Language not supported
- Packages/AudioConductor/Editor/Core/Tools/Validation/Rules/ReferenceSampleRateUnsetRule.cs.meta: Language not supported
- Packages/AudioConductor/Runtime/Core/AudioClipPlayer.WebGL.cs.meta: Language not supported
- Packages/AudioConductor/Runtime/Core/AudioConductorWebGLBroadcaster.cs.meta: Language not supported
- Packages/AudioConductor/Runtime/Core/Conductor.WebGL.cs.meta: Language not supported
- Packages/AudioConductor/Runtime/Core/ConductorBehaviour.WebGL.cs.meta: Language not supported
- Packages/AudioConductor/Runtime/Plugins.meta: Language not supported
- Packages/AudioConductor/Runtime/Plugins/WebGL.meta: Language not supported
- Packages/AudioConductor/Runtime/Plugins/WebGL/AudioConductorWebGL.jslib.meta: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This reverts commit 97ddd8c.
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.
referenceSampleRateto CueSheet: sample positions are automatically scaled at runtime when the clip's actual decoding frequency differs from the authored rate, preventing playback drift on platforms that resample audio (e.g. when Audio Import Settings do not use Preserve Sample Rate)