Commit Graph
41 Commits
Author SHA1 Message Date
39306dfd29 feat: raise event on audio despawns (#6056)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2026-06-29 19:29:42 +10:00
deltanedasanddeltanedas dc2cbd952f CompName gaming 2026-06-17 19:54:42 +01:00
83c2a1be11 [Dependency] source generator part 2 (#6550)
* [Dependency] source generator

No more reflection, no more codegen at runtime

Also various changes to Roslyn helpers to make this easier to write.

Requires all types with dependencies to be partial and not have readonly dependency fields. An analyzer enforces this at warning level, the previous injection strategies have remained in the code *for now* as a fallback.

No fallback is available for [field: Dependency] properties, due to a Roslyn bug.

Code Fixes exist. We love Roslyn

* Apply dependencies generator changes to all code

* Release notes

* Preprocessor got hands

* Handle nullable dependencies

These are bad but gotta deal with it.

* Apply suggestions from code review

Co-authored-by: Moony <moony@hellomouse.net>

* Fine, let's not use collection expressions

---------

Co-authored-by: Moony <moony@hellomouse.net>
2026-05-08 12:38:33 +02:00
17662baaf7 Fixed looped audio playback position calculation (#6325)
* fix: looped audio position calculation

* refactor: tiny clean up

* move comment

* fix: review changes

* remove `

* rerun tests

* Remove unecessary formatting changes

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2026-01-19 21:05:44 +01:00
Pieter-Jan BriersandGitHub 21581df93d Revert "make SharedAudioSystem.Stop not return early when the current tick has already been predicted" (#6375)
Revert "make SharedAudioSystem.Stop not return early when the current tick ha…"

This reverts commit c41d63be27.
2026-01-19 20:40:31 +01:00
LaCumbiaDelCoronavirusandGitHub c41d63be27 make SharedAudioSystem.Stop not return early when the current tick has already been predicted (#6137)
1 line diff
2025-11-30 17:02:35 +01:00
slarticodefastandGitHub d398e3a75b Improve error logging in SharedAudioSystem (#6202) 2025-09-17 16:56:21 +10:00
c8da6f30a3 fix: resolve remaining ResolvedSoundSpecifier warnings (#6057)
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-07-22 22:08:31 +02:00
Perry FraserandGitHub fec477bf41 fix: remove unneeded delta in SharedAudioSystem (#6055) 2025-07-12 01:56:22 +02:00
Perry FraserandGitHub 0c61ff2bee fix: default audio params for PlayStatic (#6011) 2025-06-09 00:28:12 +02:00
metalgearslothandGitHub 0e2b00edd0 Fix NaN gain audio (#5737) 2025-03-10 20:16:05 +11:00
metalgearslothandGitHub 56ced913b7 Audio fixes (#5707) 2025-02-26 22:08:17 +11:00
pathetic meowmeowandGitHub fd5a4d9b8a Refactor audio system to send collection IDs over the network (#5540)
This is important groundwork for future features such as captioning,
as a caption and other data can be associated with the collection
prototype instead of passing extra data everywhere with the sound.
2025-02-22 17:29:47 +01:00
metalgearslothandGitHub c011eff80e Increase audio despawn buffer (#5665)
Apparently it can clip and the buffer is really just there so we despawn 'at some point' and rather than hunching over my debugger for potentially an hour this is easier and almost no impact.

I've also considered flagging some audio as "play the full thing" if someone misses the start of it but need to thonk on that one a bit in future.
2025-02-16 14:30:18 +11:00
9837c33de7 Add sourcegenned field deltas (#5155)
* Remove full "delta" states

* Update MapGridComponentState

* abstract ComponentState

* Release notes

* Fix tests

* Fix nullable errors

* A

* Sourcegen component deltas

* Audio deltas + methids

* Also eye

* Optimise out the dictionary

* Minor fixes

* Physics deltas

* Also this

* Fix field deltas

* remove old release notes

* Make IComponentDelta implement IComponent

* add sourcegen launch settings

* make silent error loud

* Review

* UI deltas

* Slimmer

* Sourcegen bandaid

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2024-12-21 15:48:33 +11:00
Leon FriedrichandGitHub 19a87fb67a Remove incorrect NotNullIfNotNull attributes in SharedAudioSystem (#5449) 2024-09-18 11:43:49 +10:00
metalgearslothandGitHub f7287b181d Fix audioparams for playglobal (#5437) 2024-09-12 17:48:37 +10:00
45b7500d93 feat: added audio system predicted method for only one receiver (#5435)
* feat: added audio system predicted method for only one receiver

* renamed to PlayLocal

* tweak

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-09-12 17:41:40 +10:00
metalgearslothandGitHub 3342e1272f Add audio filename to entity name (#5338)
Will make debugging tests easier.
2024-08-06 20:54:17 +10:00
metalgearslothandGitHub dd56de70b7 Fix grid-based audio (#5087)
* Fix grid-based audio

- Fixes parenting issues.
- Add SetGridAudio as an easy way to set it up and apply the override too.

* No more global

* Rejig it all

* mergew

* review

* Minor optimisation

* Revert "Minor optimisation"

This reverts commit d0cdac7690.
2024-05-29 16:14:37 +10:00
metalgearslothandGitHub d9d5ef7471 Add audio helpers for map-based audio (#5086)
Doesn't need to be a flag because we just set it as global, whereas gridaudio cares about stuff every frame.
2024-05-02 09:51:14 +10:00
T-StalkerandGitHub ccba6b5d1c Reduce default sound range to 15 (#5085) 2024-04-30 15:41:00 +10:00
metalgearslothandGitHub 0a00e7ec29 Network audio states (#5024)
* Network audio states

Lets server pause or stop audio or whatever.

* Better API and state fix

* Bunch of fixes

- TimedDespawn proccing too early.
- PlaybackPosition setting
- SetState setting.

* Clamps and despawn fixes

* fix
2024-04-17 17:55:22 +10:00
metalgearslothandGitHub 4460454563 Implement sound VV (#4966)
* Implement sound VV

No params yet because I'm lazy but paths and collections work.

* Fixes

* rn

* review
2024-03-24 16:59:40 +11:00
metalgearslothandGitHub 7aa951ca48 Add undetachable PVS flag (#4889)
Useful in some rare cases, mainly for grid-related activities.
Specifically:
- Audio entity where we never want it detached.
- FTL previs effects to show impending squish.
2024-03-16 14:58:08 +11:00
Pieter-Jan Briers 3a55118143 Replace CVar OnValueChanged in systems with Subs.CVar 2024-02-11 13:29:27 +01:00
VasilisandGitHub d142393221 Clamp volume gain calculations (#4815) 2024-01-06 13:48:04 +11:00
metalgearslothandGitHub 517ae7f1bd Better audio logs for gain (#4789)
* Better audio logs for gain

Need to track down the -10 gain setter.

* Release checks
2023-12-31 13:34:43 +11:00
8d7d6a26ba Fix playing audio streams (#4761)
* Fix playing audio streams

* mostly address review

---------

Co-authored-by: ike709 <ike709@github.com>
2023-12-25 18:36:24 -08:00
metalgearslothandGitHub bfe8e687da Fix audio params variation (#4699) 2023-12-12 20:16:43 +11:00
metalgearslothandGitHub 43138669ec Network base not adjusted audio params (#4679) 2023-12-09 17:12:09 +11:00
metalgearslothandGitHub 9eb9c91da6 Fix predicted audio not using adjust params (#4676) 2023-12-09 14:59:22 +11:00
metalgearslothandGitHub ced2a5c6cd Make PVS overrides less bad and fix audio (#4656) 2023-12-02 19:36:55 +11:00
metalgearslothandGitHub 9ec927543f Remove audio logging (#4654) 2023-12-02 10:43:06 +11:00
metalgearslothandGitHub 0eb3c37bd8 Add detailed audio logging (#4652) 2023-12-01 20:33:29 +11:00
metalgearslothandGitHub 7ba02b5ca6 Store audio on its own map (#4651) 2023-12-01 18:48:33 +11:00
metalgearslothandGitHub c324562513 Fix audio z-offset not applying correctly (#4641) 2023-11-30 10:10:33 +11:00
metalgearslothandGitHub a1d02d7c55 Add gain setter for audio params + API cleanup (#4627) 2023-11-28 22:54:19 +11:00
2733435218 Audio rework unrevert + audio packaging (#4555)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:26 +11:00
metalgearslothandGitHub 170d192791 Revert audio rework (#4554) 2023-11-07 09:34:09 +11:00
metalgearslothandGitHub d75dbc901f Audio rework (#4421) 2023-10-29 14:58:19 +11:00