Compare commits
80 Commits
67de857f8c
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ac10d26d07 | |||
| 41ae4cc405 | |||
| 6b963f4e4a | |||
| e9b30edc56 | |||
| 6004985e06 | |||
| 7f6d0d5317 | |||
| 88ff0d1534 | |||
| d9a4ea0689 | |||
| 4813f4edf0 | |||
| cf5a2ba2c2 | |||
| 669fdea58c | |||
| 46e691e6ce | |||
| 40cc2a1329 | |||
| f1c0fb5fae | |||
| 3c2558f5e7 | |||
| 3190802bd2 | |||
| 0823328d99 | |||
| f34145d4cf | |||
| d19f61d226 | |||
| fa4fd67d98 | |||
| 10fa82bdce | |||
| 6cd802ba3a | |||
| 892689fed5 | |||
| d13ab4c409 | |||
| 342dba6596 | |||
| c30239111c | |||
| 36f4c2e2d3 | |||
| b0d117a24d | |||
| 6e8e17ec44 | |||
| bc388303be | |||
| e81d6c379d | |||
| a29b56a65e | |||
| b8e3071376 | |||
| 49a96ed091 | |||
| af4cd4da3f | |||
| 0f30f98846 | |||
| fccd6c9e0e | |||
| 61414b2fef | |||
| 5bd0135f7b | |||
| 5d92acc613 | |||
| 401dfc69b2 | |||
| f38103d2dc | |||
| e46c324ac5 | |||
| 15f220a4c7 | |||
| 01e1b67dc6 | |||
| c87a5a1e30 | |||
| 63c5f6766c | |||
| 0fdd76022d | |||
| caca71c63a | |||
| dac34089dd | |||
| 91f1b18771 | |||
| a4e6e6eccb | |||
| 0460090e25 | |||
| 5ba9c9ef2f | |||
| c3b69f48f6 | |||
| 19faccd312 | |||
| c3eb094fdc | |||
| 9890d33741 | |||
| 340b52e6b4 | |||
| d8a787d9ce | |||
| 936c8e388b | |||
| 7b9e1a3393 | |||
| 75bf03a52d | |||
| 7b01e7f906 | |||
| f38a4e5863 | |||
| 69944f44ea | |||
| a04c08d4cf | |||
| fb1225463d | |||
| 3d44ac939b | |||
| 7fc3282e80 | |||
| d824d65549 | |||
| 480cf9a016 | |||
| e00758ab9b | |||
| 47e378968f | |||
| e6907a0855 | |||
| b6393449c9 | |||
| e46e57d580 | |||
| 43f1fac33d | |||
| a6733854de | |||
| c5778c498b |
@@ -0,0 +1 @@
|
|||||||
|
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||||
@@ -6,6 +6,13 @@ Unity 2022.3.62f3, URP, C#. Custom audio & haptic middleware under the namespace
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Agent Guidelines
|
||||||
|
|
||||||
|
- **称呼**:在沟通中始终称呼用户为「思谦」或「王思谦」。
|
||||||
|
- **存疑必问**:遇到任何不确定、拿不准、信息缺失或模糊的情况,不要自行推测或假设。先收集、整理好所有问题,然后停下来向思谦提问确认。宁可多问,不要猜错。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -170,6 +177,25 @@ SfxSystem manages: throttle (`ThrottleCount`), min interval (`MinInterval`), pri
|
|||||||
- `HapticSystem.Instance.Stop(uint? hapticId = null)` — stops current haptic playback
|
- `HapticSystem.Instance.Stop(uint? hapticId = null)` — stops current haptic playback
|
||||||
- Supports four `HapticType`s: `Preset`, `Emphasis`, `Constant`, `Advance` (`.haptic` file)
|
- Supports four `HapticType`s: `Preset`, `Emphasis`, `Constant`, `Advance` (`.haptic` file)
|
||||||
|
|
||||||
|
#### Device capability & fallback
|
||||||
|
|
||||||
|
`HapticController.Play()` (`Lofelt/.../HapticController.cs:350`) uses a three-tier decision chain:
|
||||||
|
|
||||||
|
1. **Advanced device** (`DeviceCapabilities.meetsAdvancedRequirements`) → full `.haptic` playback via `LofeltHaptics`
|
||||||
|
2. **Gamepad** (`GamepadRumbler.CanPlay()`) → gamepad rumble
|
||||||
|
3. **Basic OS support** (`DeviceCapabilities.isVersionSupported`) → **always falls back to a Preset**
|
||||||
|
4. None of above → silent no-op
|
||||||
|
|
||||||
|
**Advance (`.haptic` file) fallback is Preset-only** — it never degrades to Emphasis or Constant. The fallback Preset is configured via `HapticObject.FallbackPreset` in the data table.
|
||||||
|
|
||||||
|
| HapticType | Advanced | Android basic | iOS basic |
|
||||||
|
|------------|----------|---------------|-----------|
|
||||||
|
| **Advance** | Full `.haptic` | → Preset | → Preset |
|
||||||
|
| **Emphasis** | JSON clip | 50ms max-amplitude pulse | → amplitude-mapped Preset |
|
||||||
|
| **Constant** | JSON clip with modulation | max-amplitude for `duration` | → hardcoded `HeavyImpact` |
|
||||||
|
|
||||||
|
Emphasis and Constant have their own internal fallback chains (template-based JSON clips on advanced, raw motor patterns or Presets on basic), but these are independent direct-invoke paths — they are never used as fallback targets for Advance.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Interactive Music System
|
## Interactive Music System
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,9 +7,9 @@ AudioImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
loadType: 2
|
loadType: 2
|
||||||
sampleRateSetting: 2
|
sampleRateSetting: 2
|
||||||
sampleRateOverride: 44100
|
sampleRateOverride: 22050
|
||||||
compressionFormat: 1
|
compressionFormat: 1
|
||||||
quality: 0.13
|
quality: 0.5
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
preloadAudioData: 1
|
preloadAudioData: 1
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
|
|||||||
Binary file not shown.
@@ -7,9 +7,9 @@ AudioImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
loadType: 2
|
loadType: 2
|
||||||
sampleRateSetting: 2
|
sampleRateSetting: 2
|
||||||
sampleRateOverride: 44100
|
sampleRateOverride: 22050
|
||||||
compressionFormat: 1
|
compressionFormat: 1
|
||||||
quality: 0.13
|
quality: 0.5
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
preloadAudioData: 1
|
preloadAudioData: 1
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
|
|||||||
Binary file not shown.
@@ -7,9 +7,9 @@ AudioImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
loadType: 2
|
loadType: 2
|
||||||
sampleRateSetting: 2
|
sampleRateSetting: 2
|
||||||
sampleRateOverride: 44100
|
sampleRateOverride: 22050
|
||||||
compressionFormat: 1
|
compressionFormat: 1
|
||||||
quality: 0.13
|
quality: 0.5
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
preloadAudioData: 1
|
preloadAudioData: 1
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
|
|||||||
Binary file not shown.
@@ -7,9 +7,9 @@ AudioImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
loadType: 2
|
loadType: 2
|
||||||
sampleRateSetting: 2
|
sampleRateSetting: 2
|
||||||
sampleRateOverride: 44100
|
sampleRateOverride: 22050
|
||||||
compressionFormat: 1
|
compressionFormat: 1
|
||||||
quality: 0.13
|
quality: 0.5
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
preloadAudioData: 1
|
preloadAudioData: 1
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
|
|||||||
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.
@@ -249,8 +249,14 @@ AudioMixerController:
|
|||||||
m_EnableSuspend: 1
|
m_EnableSuspend: 1
|
||||||
m_UpdateMode: 0
|
m_UpdateMode: 0
|
||||||
m_ExposedParameters:
|
m_ExposedParameters:
|
||||||
|
- guid: d66e5a701962f484baca61ea5f29bab9
|
||||||
|
name: MusicVolume
|
||||||
- guid: 9b4461d5598de4602b001fc9d34f76a7
|
- guid: 9b4461d5598de4602b001fc9d34f76a7
|
||||||
name: LowpassFreq
|
name: LowpassFreq
|
||||||
|
- guid: f9b2498f18d9c4346b50d00374df58fc
|
||||||
|
name: SFXVolume
|
||||||
|
- guid: 15cd4cd29b1a64dacb39ca2eda4de378
|
||||||
|
name: SFXAccentVolume
|
||||||
m_AudioMixerGroupViews:
|
m_AudioMixerGroupViews:
|
||||||
- guids:
|
- guids:
|
||||||
- 3ef0a681afabf403eae42ddfe3bed37e
|
- 3ef0a681afabf403eae42ddfe3bed37e
|
||||||
@@ -319,6 +325,7 @@ AudioMixerSnapshotController:
|
|||||||
676d0e59581a446dfb975928b4b3a4ea: 22000
|
676d0e59581a446dfb975928b4b3a4ea: 22000
|
||||||
0053647b950eb4d8abf883dc07d6b4ef: 1
|
0053647b950eb4d8abf883dc07d6b4ef: 1
|
||||||
47b8a12e60a1c4cf18d0d0c28f12866d: 440
|
47b8a12e60a1c4cf18d0d0c28f12866d: 440
|
||||||
|
f9b2498f18d9c4346b50d00374df58fc: 0
|
||||||
c31161cf8dc3a48478fe71156b990b48: 1333
|
c31161cf8dc3a48478fe71156b990b48: 1333
|
||||||
d171c8cff3d664001b51b62c1b77ab53: 0
|
d171c8cff3d664001b51b62c1b77ab53: 0
|
||||||
m_TransitionOverrides: {}
|
m_TransitionOverrides: {}
|
||||||
|
|||||||
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
Reference in New Issue
Block a user