Compare commits

..

76 Commits

Author SHA1 Message Date
Oliver 933bc4ceb0 fix: AudioImportTool NPE when run outside Play mode
Replace AudioExtendSettings.Instance with local AssetDatabase-loaded field to avoid nullref when AudioSystem hasn't yet initialized.
2026-06-05 11:59:25 +08:00
Oliver faba10b33e 更新说明 2026-06-04 19:10:50 +08:00
Oliver 9d34a8b556 增加测试文件,修改buffer size解决淡变时会爆音的问题 2026-05-28 19:50:58 +08:00
Oliver 25919b3f79 Update binary data. 2026-05-26 10:12:29 +08:00
Oliver 0fa6236211 chore: comment out debug log 2026-05-26 10:12:10 +08:00
Oliver a46b450ef0 feat: 音效、音量、触感开关控制 2026-05-22 20:40:35 +08:00
Oliver 5ceffa4d61 closed: streaming support 2026-05-19 12:07:48 +08:00
Oliver 106256cc32 关掉节拍器 2026-05-19 12:07:21 +08:00
Oliver 005af5c2b8 update: Playersettings 2026-05-19 12:07:13 +08:00
Oliver 9dc4228b5c feat: 在Unity内支持直接调整音频文件进行混音 2026-05-19 12:04:31 +08:00
Oliver 67de857f8c WIP: Live mixing support.
checkpoint: StreamingAsset Loader.
2026-05-18 19:25:09 +08:00
Oliver 3f0ff8b59d Add system using guide. 2026-05-18 19:04:15 +08:00
Oliver 2cec127e31 feat: support asset bundle 2026-05-15 16:45:58 +08:00
Oliver 8a0ad07a2a unify coding style 2026-05-15 10:13:09 +08:00
Oliver 51ac57d494 feat: 解耦音频与触感系统 2026-05-15 10:09:55 +08:00
Oliver 53754cd4b8 feat: migrate setting centralize to haptic system. 2026-05-14 20:42:21 +08:00
Oliver 278b1181b9 Update AGENTS.md 2026-05-14 20:23:29 +08:00
Oliver 5e0a4aef64 feat: AudioSettings 独立出配置文件,而不是零散在代码各处。 2026-05-14 20:22:00 +08:00
Oliver 410e6b0a4f 更新测试文件 2026-05-14 15:28:56 +08:00
Oliver d2882d2d42 fix: 短音频使用同步加载 2026-05-14 15:28:40 +08:00
Oliver adb506bbfd chors: 更新配置文件,修改节拍器判断逻辑 2026-05-14 11:36:21 +08:00
Oliver 1df0666c91 feat: Unified ResourceLoader
- 新增 统一 `ResourceLoader`类,负责同步/异步加载资源,并对已加载的资源缓存。
- 修改 `MusicTransition`, `AudioSystem`, `LongAudioContainerPlayer`, `MusicSegment`, 'SfxSystem`, `HapticSystem`使用最新的`ResourceLoader`。
2026-05-14 11:35:38 +08:00
Oliver 42d37512ed Update testing file 2026-05-12 15:53:00 +08:00
Oliver 8ed5cda175 update meta file 2026-05-12 15:51:54 +08:00
Oliver 8b6fabda12 feat: StartOffset
- 实现startOffset
- 修复EndOffset = 0 + 循环播放时,音乐会大量重复播放的错误。
- 增加数据校验和 BeatClock 联动。StartOffset不正确时停止bar+级 callback。
- BeatClock 现在会在每次重新播放时重启,以解决EndOffset配置错误被舍弃时,拍子对不上的问题。
2026-05-12 15:47:04 +08:00
Oliver bb472da311 更新测试文件 2026-05-08 16:41:04 +08:00
Oliver 4688484a6d refactor: 移除未使用的变量 2026-05-08 16:40:50 +08:00
Oliver 8c4b5190d3 feat: 在Inspector中可直接修改起始音乐。 2026-05-08 16:40:26 +08:00
Oliver 97fcbe3ce4 fix: Metronome may get a null AudioSystem.Instance. 2026-05-08 16:28:25 +08:00
Oliver 9496ae8bec feat: 一个可以关掉的Metronome 2026-05-07 12:09:45 +08:00
Oliver ab6e9e74e0 WIP: StartOffset 2026-05-07 12:09:16 +08:00
Oliver 8ea862b546 refactor: 重构 Transition 查询逻辑,移除 PathId 改用 ContainerId 匹配 2026-04-28 15:30:01 +08:00
Oliver 2fa3fa49d7 添加测试文件 2026-04-27 20:23:30 +08:00
Oliver 65babff4bd feat: 未配置bpm时不启动回调 2026-04-27 20:10:32 +08:00
Oliver 1fd2d2ff18 WIP: 无效音乐配置不会启动音乐回调 2026-04-27 19:57:48 +08:00
Oliver 760e94a104 更新Unity设置 2026-04-27 19:14:09 +08:00
Oliver 769f5f3d2e feature: change playing sound property 2026-04-23 19:32:06 +08:00
Oliver e0ab4e4f7e feature: Segment end offset 2026-04-21 17:25:48 +08:00
Oliver a4dee6d59b refactor: WaitForAlignment coroutine use BeatClock.cs insted of calculate independently. 2026-04-21 15:01:55 +08:00
Oliver 5cd7da8301 fix: change crossfade curve 2026-04-21 10:40:36 +08:00
Oliver 352f4b0fd2 chore: update project settings for consistent application identifiers and scripting backend 2026-04-20 14:31:35 +08:00
Oliver 0e4caa1119 refactor(audio): restructure audio constants and remove deprecated files
- Add AudioConsts.cs with Cues, NameDictionaries, and Parameters classes
- Remove AudioEnumIds.cs, AudioEnums.cs, and AudioObjectDefinitions.cs
- Update AudioObject.cs to include CueName property and serialization
- Update AudioSystem.cs to use new NameDictionaries and Parameters classes
- Update SetStateBind.cs to use Parameters.GameState type
- Change UI text from "PlaySound" to "StopSound" in SampleScene.unity
- Update binary audio data file AudioObject.bytes
2026-04-17 16:00:19 +08:00
Oliver accd311e1c refactor: use PlayDelayed API for audio delay and add Stop by ID support
- Replace PlayAfterDelay coroutine with AudioSource.PlayDelayed
- Add Stop(audioId) public API
- Add startWithMusic toggle
- Clean up namespace and debug macros
2026-04-17 11:20:17 +08:00
Oliver 2b34d0bf94 feat: SyncPoint.SameAsCurrentSegment music transition
- Add SameAsCurrentSegment mode to align new container's timeSamples with the old container's playback position, accounting for FadeInOffset
- Fix BeatClock callback burst when Restart is called with a past dspTime
- Add GetFirstLeafSource() for resolving playback position across nested containers
- Manual BeatClock.Restart replaces OnContainerEntered subscription for accurate timing with SyncPoint
2026-04-16 20:50:34 +08:00
Oliver e2c9c53aa3 add test file 2026-04-16 19:21:15 +08:00
Oliver ee68275e32 WIP: MusicTransition SyncPoint 2026-04-16 17:55:29 +08:00
Oliver 813f4254c9 feat: add PlayOnTrigger for music-synced audio playback
- Add PlayOnTrigger method to AudioSystem for scheduling audio playback on music sync events (beat/bar/grid)
- Rename ButtonInvoker to SetStateBind for better clarity
- Update PlaySoundBind to support both direct playback and trigger-based playback with callback flags
- Add CallbackFlags enum (MusicSyncBeat, MusicSyncBar, MusicSyncGrid)
- Update Metronome demo to use new callback flag naming convention
- Add test audio file sfx_notice_test.wav
- Update scene UI to demonstrate PlayOnTrigger functionality
2026-04-16 14:39:58 +08:00
Oliver 0fb0c51f65 feat: music callback 2026-04-16 11:52:55 +08:00
Oliver a085e182c4 feat: 自动更新按钮上的文字 2026-04-16 11:52:38 +08:00
Oliver b13b8f6ff6 fix: restore missing method 2026-04-16 11:11:30 +08:00
Oliver a80112a974 Merge branch 'main' into feature/MusicCallback 2026-04-16 11:06:23 +08:00
Oliver ca6fff2717 feat: Add switch container functionality 2026-04-15 21:05:17 +08:00
Oliver c62cb4f37b refactor: 更新音频导入路径变量并完善CLI方法文档
- 将对话框中的音频资源路径变量从`k_audioResourcePath`更改为`AudioAbsolutePath`
- 为RunCLI方法添加详细的XML文档注释,说明其在命令行自动化工作流中的作用
- 修正枚举AudioCategory的格式化
2026-04-15 10:57:33 +08:00
Oliver d2867810ee feat: Add audio import tool and standardize audio import settings
- Add editor tool to batch apply audio import settings based on configuration files
- Standardize sample rates: SFX/Voice to 22050 Hz, Music to 44100 Hz
- Set quality: SFX/Voice to 0.5, Music to 0.13
- Adjust load types based on audio duration
- Set project sample rate to 48000 Hz
- Update preload settings for voice and music files
2026-04-15 10:05:05 +08:00
Oliver f7ca4b620e feat: Add haptic system integration and audio test UI
- Add new audio assets and PlaySoundBind script for testing audio playback via UI input field.
- Implement haptic feedback integration in SfxSystem and fix initialization timing in HapticSystem.
- Update project settings with correct Android target architecture.
- Adjust DSP buffer size and enable development build debug logging.
2026-04-14 10:18:34 +08:00
Oliver c3d520d969 Merge branch 'main' into feature/HapticSystem 2026-04-13 17:31:59 +08:00
Oliver d42a60cd62 refactor: 使用ActiveSound对象传递音高和音量参数 2026-04-13 17:27:59 +08:00
Oliver 31d117851e feat: implement volume step feature
- Add volume step functionality with VolumeStepResolver class
- Add VolumeStepThreshold, Volume, and VolumeStep properties to AudioObject
- Integrate volume step resolution in SfxSystem for dynamic audio volume control
2026-04-13 16:56:34 +08:00
Oliver ce850a0e30 WIP: haptic system bridge 2026-04-13 15:32:04 +08:00
Oliver d18a7544c4 feat: Import Haptic System 2026-04-13 14:56:06 +08:00
Oliver 49e3492d61 add test file 2026-04-09 11:37:58 +08:00
Oliver 49a502e647 WIP: Music callback
- 头几拍会抖动一下,导致对不上拍子
2026-04-07 10:06:02 +08:00
Oliver 0f204aa794 feat: prepare music callback data. 2026-04-03 14:48:42 +08:00
Oliver e9054d677d refactor: Remove pitch parameter from PlayAfterDelay coroutine 2026-04-03 14:30:45 +08:00
Oliver a4f2eb645a feat: 重构音频系统 - 重命名AudioScheduler为SfxSystem并添加Accented音效类型
- 将AudioScheduler重命名为SfxSystem,统一命名规范
- 新增MixingType.Accented音效类型,支持强调音效独立混音
- 重构音频混合器层级: Master下新增Regular中间层
- SfxSystem使用外部AudioSourcePool,与MusicSystem隔离
- 修复ambiencePoolRoot父节点错误(原错误挂载到musicPoolRoot)
- Play方法支持onPlay回调
- 同步更新AudioObject.bytes二进制配置数据
2026-04-03 11:53:15 +08:00
Oliver 89c024e781 feat: implement audio object definitions and refactor audio system
- Add AudioObjectDefinitions.cs with name-to-ID mappings and ambiguity detection
- Update AudioSystem.cs to support Play(uint) and deprecated Play(string) with warnings
- Rename PitchStepManager to PitchStepResolver and update all references
- Refactor generated code to use 'this.' prefix and foreach loops
- Remove TestEnum from audio enums and IDs
- Update SampleScene.unity to use new AudioSystem namespace and rain sound parameter
- Optimize binary serialization in generated audio classes
2026-04-02 14:31:46 +08:00
Oliver 03b06fd83e 使用DoTween重构淡变效果 2026-03-27 17:57:27 +08:00
Oliver e774581bfe 增加低通效果开关
- 引入DoTween
- 实现功能
2026-03-27 17:56:49 +08:00
Oliver 2248de2dcf 自动化注册GroupState 2026-03-26 16:25:24 +08:00
Oliver c02d7e11ef 配合打表工具更新 2026-03-26 15:07:02 +08:00
Oliver e2e9aa6725 移除未使用method 2026-03-25 17:22:14 +08:00
Oliver e032f7687f 解决重复切换State的时候会导致重复播放对应Segment的问题。
修复FadeIn读取了FadeOut参数的问题。
增加Initial Delay功能。
重构AudioScheduler.ConfigureSource() -> SetupSource(), RegisterActiveSound(), StartPlayBack()。
移动长音频相关功能至LongAudio文件夹。
2026-03-25 17:01:38 +08:00
Oliver 0f7e286206 提供DebugOverlay 2026-03-25 16:56:19 +08:00
Oliver 85d66f4bea 禁用FaderLog 2026-03-20 18:49:25 +08:00
Oliver 27d57a28a9 可能的性能优化 2026-03-20 18:48:11 +08:00
Oliver 41e38311f0 first commit 2026-03-20 17:55:53 +08:00
196 changed files with 5 additions and 13 deletions
-1
View File
@@ -1 +0,0 @@
*.wav filter=lfs diff=lfs merge=lfs -text
-7
View File
@@ -6,13 +6,6 @@ Unity 2022.3.62f3, URP, C#. Custom audio & haptic middleware under the namespace
--- ---
## Agent Guidelines
- **称呼**:在沟通中始终称呼用户为「思谦」或「王思谦」。
- **存疑必问**:遇到任何不确定、拿不准、信息缺失或模糊的情况,不要自行推测或假设。先收集、整理好所有问题,然后停下来向思谦提问确认。宁可多问,不要猜错。
---
## Architecture ## Architecture
``` ```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More