Commit Graph

23 Commits

Author SHA1 Message Date
nicholas howe
01fd97edb4 When an audio bus writer node is assigned a bus with more channels than it expects, ensure the extra channels are filled with silence.
#tests audio bus engine tests pass
#rb phil.popp

[CL 34345399 by nicholas howe in ue5-main branch]
2024-06-13 13:14:05 -04:00
nicholas howe
9e4adb4d75 Audio Bus Reader-Writer Nodes Don't CreatePatch in Reset
#tests all audio bus engine tests pass
#rb Rob.Gay

[CL 34154610 by nicholas howe in ue5-main branch]
2024-06-06 09:01:57 -04:00
nicholas howe
5d347fd06f Bus Reader-Writer Node Crash Fix
[CL 34020204 by nicholas howe in ue5-main branch]
2024-05-30 19:35:23 -04:00
nicholas howe
5921988c1f Bus Reader-Writer Node Consistent Latency Fix
#tests EngineTest Audio Bus functional tests all pass
#rb Aaron.McLeran, Rob.Gay, phil.popp

[CL 34003097 by nicholas howe in ue5-main branch]
2024-05-30 10:27:00 -04:00
nicholas howe
516f1583cf [Backout] - CL28809638
[FYI] nicholas.howe
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL28807780
[FYI] nicholas.howe
Original CL Desc
-----------------------------------------------------------------
Mixer patch fast connect

New patch connections to the mixer are established before the next mix.
Additional adjustments to bus reader and writer buffering to ensure enough data is in their patches.

Differences between the MetaSound and mixer sample rates are still not accounted for in the bus reader/writer nodes or elsewhere.

#jira UE-196230
[REVIEW] [at]phil.popp

[CL 28810970 by nicholas howe in ue5-main branch]
2023-10-16 14:42:40 -04:00
nicholas howe
d60a0d839a [Backout] - CL28807780
[FYI] nicholas.howe
Original CL Desc
-----------------------------------------------------------------
Mixer patch fast connect

New patch connections to the mixer are established before the next mix.
Additional adjustments to bus reader and writer buffering to ensure enough data is in their patches.

Differences between the MetaSound and mixer sample rates are still not accounted for in the bus reader/writer nodes or elsewhere.

#jira UE-196230
[REVIEW] [at]phil.popp

[CL 28810638 by nicholas howe in ue5-main branch]
2023-10-16 14:36:18 -04:00
nicholas howe
184d436e36 Mixer patch fast connect
New patch connections to the mixer are established before the next mix.
Additional adjustments to bus reader and writer buffering to ensure enough data is in their patches.

Differences between the MetaSound and mixer sample rates are still not accounted for in the bus reader/writer nodes or elsewhere.

#jira UE-196230
[REVIEW] [at]phil.popp

[CL 28808728 by nicholas howe in ue5-main branch]
2023-10-16 14:11:32 -04:00
helen yang
0ab4260553 Update use of MetaSound FCreateOperatorParams to FBuilderOperatorParams for perf (Part 1)
#jira UE-195871
#rb phil.popp

[CL 28779659 by helen yang in ue5-main branch]
2023-10-13 19:29:51 -04:00
matthew booth
b07fdf099c Limit the amount of log spam:
LogMetaSound: Warning: Underrun detected in audio bus writer node
[REVIEW] [at]charlie.huguenard
[FYI] [at]nick.howe

[CL 28349333 by matthew booth in ue5-main branch]
2023-09-29 14:26:52 -04:00
nicholas howe
499d1275d4 Audio bus writer underrun warning fix.
[FYI] matthew.booth
[REVIEW] [at]phil.popp [at]buzz.burrowes [at]charlie.huguenard [at]jake.burga
#tests AudioQA AQ_AudioBus_MetaSounds map, EngineTest test list "All Tests" group "Audio" search "audio bus"

[CL 27524115 by nicholas howe in ue5-main branch]
2023-08-31 11:23:00 -04:00
maxwell hayes
ebf6e4caf7 [Metasound Bind] Fixup for bind issues caught by new automated tests.
#jira UE-187406, UE-187390, UE-187404, UE-187403, UE-187405, UE-187392, UE-187391, UE-187395, UE-187399, UE-187398, UE-187389, UE-187393, UE-187394, UE-187396, UE-187397, UE-187401
#rb phil.popp

[CL 26130674 by maxwell hayes in ue5-main branch]
2023-06-20 15:08:54 -04:00
miles flanagan
34fe243092 Allow Metasound Bus Reader and Writer nodes to set up patch inputs after construction if their busses are set later
#jira UE-187408
#rb phil.popp

[CL 25848966 by miles flanagan in ue5-main branch]
2023-06-07 12:51:55 -04:00
maxwell hayes
568aa49a91 [Metasounds] re-adding Reset() function from audio bus writer node.
#jira UE-184800
#rb Phil.Popp
[FYI] Phil.Popp
#preflight 645975e54c3ec54e6e2d0a0a

[CL 25396155 by maxwell hayes in ue5-main branch]
2023-05-09 17:27:12 -04:00
phil popp
e8be08d06e [Metasounds] removing Reset() function from0 audio bus writer node to see if it is the cause of automated test crashes.
#jira UE-184201
#rb Phil.Popp
#preflight 6449aa4a6b589f8b369fa4a2
[FYI] Maxwell.Hayes

[CL 25225488 by phil popp in ue5-main branch]
2023-04-27 18:49:33 -04:00
maxwell hayes
b2246c57ee [Metasounds] Adding Reset() function to audio bus reader/writer nodes.
#jira UE-179001
#rb Phil.Popp
#preflight 644317e90171aae0b1de17df

[CL 25156686 by maxwell hayes in ue5-main branch]
2023-04-21 20:49:41 -04:00
maxwell hayes
e5d027e80c [Backout] - CL25139335
[FYI] Dan.Nottingham
Original CL Desc
-----------------------------------------------------------------
[Metasounds] Adding Reset() function to audio bus reader/writer nodes.
#jira UE-179001
#rb Phil.Popp
#preflight 6441b293c023bb1f73cbddb1

[CL 25150905 by maxwell hayes in ue5-main branch]
2023-04-21 14:55:25 -04:00
maxwell hayes
3164bd34d0 [Metasounds] Adding Reset() function to audio bus reader/writer nodes.
#jira UE-179001
#rb Phil.Popp
#preflight 6441b293c023bb1f73cbddb1

[CL 25140541 by maxwell hayes in ue5-main branch]
2023-04-20 19:49:03 -04:00
nicholas howe
1c419fc963 Audio Bus Reader/Writer Nodes Crackle Fix
Audio Bus Reader Node more accurately calculates how many samples it needs before it can start popping.
Reader node has a CVar timeout on how long it'll wait for samples (whereas it used to calculate a huge timeout value that I suspect was erroneous).  In theory the samples should always become available even with an infinite timeout.
The Metasound generator's BuilderTask's completion is ensured at the beginning of FMetasoundGenerator::OnGenerateAudio.  This prevents the mixer, writer and reader nodes from getting out of sync in terms of samples output and input.
FMixerAudioBus::MixBuffer doesn't try to cache any samples and just uses PopAudio and PushAudio directly on its mixer and splitter.
FPatchOutput::WaitUntilNumSamplesAvailable no longer has a race condition and an attempt has been made to improve thread-safety in FPatchOutput.

#jira UE-170575
#rb phil.popp
#preflight 63fcbfe2a134e0b059c64c76

[CL 24427705 by nicholas howe in ue5-main branch]
2023-02-27 13:29:22 -05:00
phil popp
1d78b81b52 Metasound automated node tests and fixes
#jira UE-175097
#rb Charlie.Huguenard
#preflight 63d1895f033e457ba8f10cb4

[CL 23863384 by phil popp in ue5-main branch]
2023-01-25 20:41:44 -05:00
helen yang
b9eb6cda6c Audio bus subsystem refactor checkpoint
- Move audio bus functionality from Mixer Device to new Audio Bus Subsystem
- Add new audio bus key struct so that FMixerAudioBuses do not have to be created with UObject ids

#jira UE-169610
#rb phil.popp, ryan.mangin, rob.gay
#preflight 63906195255f07df8e452b8c

[CL 23429172 by helen yang in ue5-main branch]
2022-12-07 11:04:50 -05:00
nicholas howe
115d386688 Audio bus reader node output patch buffer size fix
This fixes a bug where audio bus reader nodes might never start popping audio because AudioCallbackBufferFrameSize is set to a value other than the default 1024, such as 256.

Replace AddPatchForAudioBus with AddPatchOutputForAudioBus, which is parameterized by the desired number of frames and channels in the patch output.
Update AddPatchInputForAudioBus to match.
Both functions use a new MakePatch function to create a patch based on the parameters and scaled to fit the number of blocks specified by the new "au.PatchBufferBlocks" cvar.
Add support for quad, 5.1, and 7.1 bus reader and writer nodes.

[REVIEW] [at]phil.popp
#preflight 6386191a4004f73f62c48875

[CL 23312512 by nicholas howe in ue5-main branch]
2022-11-29 12:35:48 -05:00
nicholas howe
de7aee9ba3 Fix Audio Bus Writer Node patch input buffer size calculation
Calculation no longer assumes BlockSizeFrames >= AudioMixerOutputFrames.
Overall size reduced to three quarters because my testing suggests that's adequate.

#jira UE-170575
#preflight 637d3f32e30d438849a45d7a

[CL 23244689 by nicholas howe in ue5-main branch]
2022-11-22 20:28:12 -05:00
nicholas howe
373ad2a12c Metasound Audio Bus Writer Node
Adds a metasound node that sends its audio input to an audio bus.
Modifies the audio mixer interface to support the node.

FMixerSourceManager::StartAudioBus no longer sets bIsPlaying to false on sources that use an audio bus when the audio bus starts.
FMixerAudioBus::MixBuffer mixes its patch inputs into its MixedSourceData buffer, so that the patch input data is available when CopyCurrentBuffer is used to retrieve the mix.

[REVIEW] [at]aaron.mcleran [at]buzz.burrowes [at]phil.popp
#preflight 6372639c5368a3230a4ed041

[CL 23123823 by nicholas howe in ue5-main branch]
2022-11-14 14:44:30 -05:00