30 Commits

Author SHA1 Message Date
ryan mangin
88fadb42aa Improve logging for FMetasoundGeneratorHandle
#rb Aaron.McLeran
#rnx

[CL 34853835 by ryan mangin in ue5-main branch]
2024-07-16 16:58:09 -04:00
buzz burrowes
f662ec795e Massive Midi Clock Refactor
- Entirely new data structure for FMidiClock
- New FMidiCursor to replace old FMidiPlayCursorMgr & FMidiPlayCursor
- Heavily modified FMetasoundMidiClockDriverto handle new clock system
- New Midi clock vertex analyzer that saves a clock history

#rb charlie.huguenard, jake.burga, nicholas.howe

[CL 33976126 by buzz burrowes in ue5-main branch]
2024-05-29 11:58:19 -04:00
dan nottingham
3f36d6d28a Fix potential PIE crash from FMetasoundGeneratorHandle::UpdateOutputWatchersInternal triggering Blueprint callbacks during PostLoad. Have FMetasoundGeneratorHandle::HandleOutputChanged call back to the game thread using ExecuteOnGameThread rather than AsyncTask(ENamedThreads::GameThread). And fix up several other locations that might trigger BP events.
[REVIEW] [at]Charlie.Huguenard
#rb charlie.huguenard

[CL 33644758 by dan nottingham in ue5-main branch]
2024-05-14 20:54:45 -04:00
charlie huguenard
628c226a65 [Metasound] Remove tick from UMetaSoundOutputSubsystem, only drain queues when there is new data.
#jira UE-214437
#rb ryan.mangin
#tests automated tests

#virtualized

[CL 33556994 by charlie huguenard in ue5-main branch]
2024-05-09 15:58:51 -04:00
chris ritter
c92ef085b9 Expose VertexInterface changes in OnGeneratorIOUpdated
#rb phil.popp
#tests PIE, MetasoundDynamicGenerator test suite
[FYI] charlie.huguenard

[CL 32873045 by chris ritter in ue5-main branch]
2024-04-11 02:17:22 -04:00
matthew booth
5ee63ad5f0 [MetasoundEngine] Provide UnwatchOutput API as inverse of WatchOutput operation.
#rb charlie.huguenard

[CL 31859188 by matthew booth in ue5-main branch]
2024-02-27 19:26:07 -05:00
robert rouhani
3f492576f2 [Metasound] Add native delegate option for WatchOutput in FMetasoundGeneratorHandle and related classes.
- Updated StressTest_MetasoundOutputs to optionally use the new native delegates.
- In local testing the native delegates were ~40% faster on average than dynamic delegates, when measuring FMetasoundGeneratorHandle::UpdateOutputWatchers.

#rb charlie.huguenard phil.popp
#tests EngineTest - PIE, Standalone


#virtualized

[CL 29067112 by robert rouhani in ue5-main branch]
2023-10-25 00:54:11 -04:00
charlie huguenard
a85897c9f1 [Patchwork] Live Update Support
#rb matthew.booth, kevin.cavanaugh

[CL 28976895 by charlie huguenard in ue5-main branch]
2023-10-20 15:29:38 -04:00
charlie huguenard
fe8e832250 [Metasound] Use a map for faster generator handle output lookup.
This results in a ~70% CPU time improvement.

#jira UE-196859
#rb phil.popp, matthew.booth

[CL 28417691 by charlie huguenard in ue5-main branch]
2023-10-03 12:04:46 -04:00
charlie huguenard
2ac6945a2c [Metasound] Use FindClassOutputWithName instead of GetOutputNodeWithName to get output metadata in FMetasoundGeneratorHandle::WatchOutputs
This results in a 98% improvement in CPU time.

#jira UE-196859
#rb phil.popp

[CL 28410906 by charlie huguenard in ue5-main branch]
2023-10-03 08:47:53 -04:00
charlie huguenard
af47bb307d [Metasound] Guard against unbounded growth of the output queue
#jira UE-195495
#rb rob.gay

[CL 27911847 by charlie huguenard in ue5-main branch]
2023-09-15 08:01:14 -04:00
charlie huguenard
4bc5c685e8 [Metasound] Refactor UMetasoundGeneratorHandle to work with Live Update
#rb phil.popp, rob.gay

[CL 27879781 by charlie huguenard in ue5-main branch]
2023-09-14 11:16:32 -04:00
matthew booth
2c1190d1d5 [Metasound] Add the ability to get Metasound rendering perf numbers (timing) at runtime.
#rb [at]phil.popp [at]charlie.huegunard [at]rob.gay

[CL 27338257 by matthew booth in ue5-main branch]
2023-08-24 08:28:12 -04:00
charlie huguenard
29ebd6a621 [Metasound] Remove unnecessary lambda capture when a generator is destroyed
#rb phil.popp

[CL 26433505 by charlie huguenard in ue5-main branch]
2023-07-18 10:18:41 -04:00
charlie huguenard
04cc192f7e [Metasound] Invalidate output changed delegate handle when generator is destroyed
#jira UE-185909
#rnx
#preflight 6462ae56b87b09aadd3e14b1

[CL 25494996 by charlie huguenard in ue5-main branch]
2023-05-16 15:30:22 -04:00
charlie huguenard
657def06c3 [Metasound] Fix race which would sometimes cause generator handles to stop receiving output updates from generators.
While the "thread-safe" variety of delegates does protect the invocation list from data races, if you use AddUObject, it will end up calling TWeakObjectPtr::Get() when it attempts to compact the invocation list (as it does when broadcasting or adding), which as far as I can tell is not thread-safe. This means it can sometimes incorrectly report that the object is no longer valid and should be removed from the invocation list.

#rnx
#rb phil.popp
#preflight 645beeb9ab621cb7013043a9

[CL 25429370 by charlie huguenard in ue5-main branch]
2023-05-11 12:18:34 -04:00
buzz burrowes
46600099fa Merge conflict reolution (by hand)
[CL 25418491 by buzz burrowes in ue5-main branch]
2023-05-10 18:10:35 -04:00
charlie huguenard
3ba6439ab6 [Metasound] Check whether analyzer exists before attempting to add it to a generator.
Also, remove ensure when trying to find an analyzer factory, since we can fail gracefully.

#jira UE-185335
#rnx
#rb phil.popp
#preflight 645a6477a73096fab7787284

[CL 25402611 by charlie huguenard in ue5-main branch]
2023-05-10 08:29:22 -04:00
charlie huguenard
7b12ccaeae [Metasound] Get history of output changes instead of last value
#preflight 64513fbb4d593c0b42b03cc8
#rb phil.popp

[CL 25320519 by charlie huguenard in ue5-main branch]
2023-05-03 13:43:51 -04:00
charlie huguenard
16e205ba71 [Metasound] Pass audio component id to OnGeneratorInstanceCreated instead of the individual voice id
#jira UE-184555, UE-184554
#preflight 644befb1f50260822919bc80

[CL 25234241 by charlie huguenard in ue5-main branch]
2023-04-28 12:28:48 -04:00
charlie huguenard
5f5e340d51 [Metasound] Re-register output analyzers if sound is stopped and re-started
#jira UE-183409
#rnx
#rb phil.popp
#preflight 643dc576bf1053846626eb75

[CL 25084655 by charlie huguenard in ue5-main branch]
2023-04-18 08:44:35 -04:00
charlie huguenard
fb1959d641 [Metasound] Fix races in UMetasoundOutputSubsystem
The generator created/destroyed events get called on the audio thread, so avoid manipulating containers used on the game thread in the event.

#rnx
#rb phil.popp, aaron.mcleran
#preflight 642db4d71d19c0312a39ab12

[CL 24937556 by charlie huguenard in ue5-main branch]
2023-04-05 17:42:36 -04:00
buzz burrowes
e7af0e2bde Add TRACE macros for profiling
[REVIEW] [at]phil.popp
#preflight 642c2cea4d26bcd1eb7aaac3

[CL 24912849 by buzz burrowes in ue5-main branch]
2023-04-04 12:40:45 -04:00
marc audy
e330959f2a Fix bad merge
#rnx

[CL 24906562 by marc audy in ue5-main branch]
2023-04-03 23:32:48 -04:00
buzz burrowes
93831837d9 Namespace the names of the multicast delegate definitions (move them into the class definition) to avoid polluting the global namespace.
[REVIEW] [at]phil.popp [at]charlie.huguenard
#preflight 642b2a92ce01db47acc4bf9b

[CL 24906544 by buzz burrowes in ue5-main branch]
2023-04-03 23:31:26 -04:00