2016-01-07 08:17:16 -05:00
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
/*------------------------------------------------------------------------------------
FSLESSoundSource .
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
# include "AndroidAudioDevice.h"
# include "AudioDecompress.h"
# include "Engine.h"
// Callback that is registered if the source needs to loop
void OpenSLBufferQueueCallback ( SLAndroidSimpleBufferQueueItf InQueueInterface , void * pContext )
{
FSLESSoundSource * SoundSource = ( FSLESSoundSource * ) pContext ;
if ( SoundSource )
{
SoundSource - > OnRequeueBufferCallback ( InQueueInterface ) ;
}
}
// Requeues buffer to loop Sound Source
void FSLESSoundSource : : OnRequeueBufferCallback ( SLAndroidSimpleBufferQueueItf InQueueInterface )
{
if ( ! bStreamedSound )
{
SLresult result = ( * SL_PlayerBufferQueue ) - > Enqueue ( SL_PlayerBufferQueue , Buffer - > AudioData , Buffer - > GetSize ( ) ) ;
if ( result ! = SL_RESULT_SUCCESS )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER Enqueue SL_PlayerBufferQueue (Requeing) " ) ) ;
}
bHasLooped = true ;
}
else
{
// Enqueue the previously decoded buffer
2015-06-05 16:09:35 -04:00
if ( RealtimeAsyncTask )
{
RealtimeAsyncTask - > EnsureCompletion ( ) ;
switch ( RealtimeAsyncTask - > GetTask ( ) . GetTaskType ( ) )
{
case ERealtimeAudioTaskType : : Decompress :
bHasLooped = RealtimeAsyncTask - > GetTask ( ) . GetBufferLooped ( ) ;
break ;
case ERealtimeAudioTaskType : : Procedural :
AudioBuffers [ BufferInUse ] . AudioDataSize = RealtimeAsyncTask - > GetTask ( ) . GetBytesWritten ( ) ;
break ;
}
delete RealtimeAsyncTask ;
RealtimeAsyncTask = nullptr ;
}
2016-03-17 11:10:14 -04:00
// Sound decoding is complete, just waiting to finish playing
if ( bBuffersToFlush )
{
// set the player's state to stopped
SLresult result = ( * SL_PlayerPlayInterface ) - > SetPlayState ( SL_PlayerPlayInterface , SL_PLAYSTATE_STOPPED ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
return ;
}
2014-03-14 14:13:41 -04:00
SLresult result = ( * SL_PlayerBufferQueue ) - > Enqueue ( SL_PlayerBufferQueue , AudioBuffers [ BufferInUse ] . AudioData , AudioBuffers [ BufferInUse ] . AudioDataSize ) ;
if ( result ! = SL_RESULT_SUCCESS )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER Enqueue SL_PlayerBufferQueue (Requeing) " ) ) ;
}
2015-06-05 16:09:35 -04:00
// Switch to the next buffer and decode for the next time the callback fires if we didn't just get the last buffer
2014-03-14 14:13:41 -04:00
BufferInUse = ! BufferInUse ;
2015-06-05 16:09:35 -04:00
if ( bHasLooped = = false | | WaveInstance - > LoopingMode ! = LOOP_Never )
{
2016-03-17 11:10:14 -04:00
// Do this in the callback thread instead of creating an asynchronous task (thread id from callback is not consistent and use of TLS for stats causes issues)
if ( ReadMorePCMData ( BufferInUse , EDataReadMode : : Synchronous ) )
2015-06-05 16:09:35 -04:00
{
// If this is a synchronous source we may get notified immediately that we have looped
bHasLooped = true ;
}
}
2014-03-14 14:13:41 -04:00
}
}
bool FSLESSoundSource : : CreatePlayer ( )
{
// data info
SLDataLocator_AndroidSimpleBufferQueue LocationBuffer = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE , 1 } ;
// PCM Info
SLDataFormat_PCM PCM_Format = { SL_DATAFORMAT_PCM , SLuint32 ( Buffer - > NumChannels ) , SLuint32 ( Buffer - > SampleRate * 1000 ) ,
SL_PCMSAMPLEFORMAT_FIXED_16 , SL_PCMSAMPLEFORMAT_FIXED_16 ,
Buffer - > NumChannels = = 2 ? ( SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT ) : SL_SPEAKER_FRONT_CENTER ,
SL_BYTEORDER_LITTLEENDIAN } ;
SLDataSource SoundDataSource = { & LocationBuffer , & PCM_Format } ;
// configure audio sink
SLDataLocator_OutputMix Output_Mix = { SL_DATALOCATOR_OUTPUTMIX , ( ( FSLESAudioDevice * ) AudioDevice ) - > SL_OutputMixObject } ;
SLDataSink AudioSink = { & Output_Mix , NULL } ;
// create audio player
const SLInterfaceID ids [ ] = { SL_IID_BUFFERQUEUE , SL_IID_VOLUME } ;
const SLboolean req [ ] = { SL_BOOLEAN_TRUE , SL_BOOLEAN_TRUE } ;
SLresult result = ( * Device - > SL_EngineEngine ) - > CreateAudioPlayer ( Device - > SL_EngineEngine , & SL_PlayerObject ,
& SoundDataSource , & AudioSink , sizeof ( ids ) / sizeof ( SLInterfaceID ) , ids , req ) ;
if ( result ! = SL_RESULT_SUCCESS )
{
2015-01-20 10:09:11 -05:00
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER CreateAudioPlayer 0x%x " ) , result ) ;
2014-03-14 14:13:41 -04:00
return false ;
}
bool bFailedSetup = false ;
// realize the player
result = ( * SL_PlayerObject ) - > Realize ( SL_PlayerObject , SL_BOOLEAN_FALSE ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER Realize 0x%x " ) , result ) ; return false ; }
2014-03-14 14:13:41 -04:00
// get the play interface
result = ( * SL_PlayerObject ) - > GetInterface ( SL_PlayerObject , SL_IID_PLAY , & SL_PlayerPlayInterface ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER GetInterface SL_IID_PLAY 0x%x " ) , result ) ; bFailedSetup | = true ; }
2014-03-14 14:13:41 -04:00
// volume
result = ( * SL_PlayerObject ) - > GetInterface ( SL_PlayerObject , SL_IID_VOLUME , & SL_VolumeInterface ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER GetInterface SL_IID_VOLUME 0x%x " ) , result ) ; bFailedSetup | = true ; }
2014-03-14 14:13:41 -04:00
// buffer system
result = ( * SL_PlayerObject ) - > GetInterface ( SL_PlayerObject , SL_IID_BUFFERQUEUE , & SL_PlayerBufferQueue ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER GetInterface SL_IID_BUFFERQUEUE 0x%x " ) , result ) ; bFailedSetup | = true ; }
2014-03-14 14:13:41 -04:00
return bFailedSetup = = false ;
}
void FSLESSoundSource : : DestroyPlayer ( )
{
if ( SL_PlayerObject )
{
// close it down...
( * SL_PlayerObject ) - > Destroy ( SL_PlayerObject ) ;
SL_PlayerObject = NULL ;
SL_PlayerPlayInterface = NULL ;
SL_PlayerBufferQueue = NULL ;
SL_VolumeInterface = NULL ;
}
}
bool FSLESSoundSource : : EnqueuePCMBuffer ( bool bLoop )
{
SLresult result ;
// If looping, register a callback to requeue the buffer
if ( bLoop )
{
result = ( * SL_PlayerBufferQueue ) - > RegisterCallback ( SL_PlayerBufferQueue , OpenSLBufferQueueCallback , ( void * ) this ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER QUEUE RegisterCallback 0x%x " ) , result ) ; return false ; }
2014-03-14 14:13:41 -04:00
}
2014-08-18 09:13:38 -04:00
2014-03-14 14:13:41 -04:00
result = ( * SL_PlayerBufferQueue ) - > Enqueue ( SL_PlayerBufferQueue , Buffer - > AudioData , Buffer - > GetSize ( ) ) ;
2016-03-17 11:10:14 -04:00
if ( result ! = SL_RESULT_SUCCESS ) {
Copying //UE4/Release-Staging-4.12 to //UE4/Main (Source: //UE4/Release-4.12 @ 2992821)
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2992821 on 2016/05/27 by Max.Chen
Subway Sequencer: Add "Assets" and "Character" to the list of additional directories to cook.
#jira UE-31279
#lockdown Cristina.Riveron
Change 2992761 on 2016/05/27 by Max.Chen
Add assets from "Directories to Always Cook".
#jira UE-31279
#lockdown Cristina.Riveron
Change 2992371 on 2016/05/26 by Dmitry.Rekman
Fix GUBP Tools node (UE-31378).
#jira UE-31378
#lockdown Josh.Adams
Change 2992279 on 2016/05/26 by Dmitry.Rekman
One more fix for UAT compilation failure (UE-31312).
- Make EnvVarsToXML target framework v4.5.
#lockdown Josh.Adams
#jira UE-31312
Change 2992060 on 2016/05/26 by Josh.Adams
- Reset PVRTC compression quality to default, so cooks don't take forever for IOS. We shipped with PVRTC Quality 4 for the App Store version. This is set in the Cooker Settings in the Project Settings window.
#lockdown cristina.riveron
#jira UE-31373
Change 2992009 on 2016/05/26 by Dmitry.Rekman
Fix packaging on Linux (UE-31312).
- System.Xml was spelled as System.XML.
#jira UE-31312
#lockdown Josh.Adams
Change 2991784 on 2016/05/26 by Martin.Wilson
Fix for RecalcRequiredBones crashing when there is no lod data
#jira UE-30028
#lockdown cristina.riveron
Change 2991744 on 2016/05/26 by Dmitry.Rekman
Fix Linux code project generation (UE-31322).
- Also fixes UE-31318 (not reopening when creating BP project).
- Apparently, we cannot reset all signals to default, this makes posix_spawn() fail after fork (child exits with 127).
- Added logging of child's return code.
#lockdown Josh.Adams
#jira UE-31322
#jira UE-31318
Change 2991448 on 2016/05/26 by Nick.Darnell
Disabling the logging in the git module that was added from the previous commit.
#jira UE-30781
#lockdown cristina.riveron
Change 2991352 on 2016/05/26 by Max.Chen
Subway Sequencer: Add "Sequencer" to the list of additional directories to cook.
#jira UE-31279
#lockdown Cristina.Riveron
Change 2991121 on 2016/05/26 by Ben.Marsh
Fix ShooterGame warnings on XboxOne.
#lockdown cristina.riveron
Change 2991097 on 2016/05/26 by Nick.Darnell
PR #2386: Git Plugin: fix initialization of a new repository broken by new "migrate" support 4.12 (Contributed by SRombauts)
#jira UE-30781
#lockdown cristina.riveron
Change 2991095 on 2016/05/26 by Dmitry.Rekman
Fix packaging on Linux (UE-31312).
- Excludes UAT modules unsupported on the platform (e.g. TVOS).
#jira UE-31312
#lockdown Josh.Adams
Change 2990806 on 2016/05/25 by Michael.Gay
Last minute adjustments to SubwaySequencer shots.
Fixed Fade track on master and moved Event tracks to shots.
#jira UE-30804
#lockdown Cristina.Riveron
Change 2990739 on 2016/05/25 by Dan.Oconnor
Fix for transaction buffer failing to restore preview widget trees, these are regenerated post undo/redo and should not be tagged as transactional
#jira UE-31155
#lockdown cristina.riveron
Change 2990657 on 2016/05/25 by Dmitry.Rekman
Fix crash in mono when invoked by the engine (UE-31312).
- Reset signal mask on spawning a subprocess. We mask out all signals except explicitly handled, which does not play well with mono.
- See also https://answers.unrealengine.com/questions/420161/mono-process-crash.html
#jira UE-31312
#lockdown Josh.Adams
Change 2990564 on 2016/05/25 by Marc.Audy
Undo 4.12 change to DetachFromParent when AttachTo is called with a null parent.
#jira UE-00000
#lockdown Cristina.Riveron
Change 2990429 on 2016/05/25 by Max.Chen
Movie Capture: Fix initialization order warning. Follow up to CL #2990314
#jira UE-31285
#lockdown Nick.Penwarden
Change 2990338 on 2016/05/25 by Zabir.Hoque
TEMP Fix: On server enqued render thread work is dropped. So on server release Reflection capture resouce immediately instead of trying to defer enque.
#jira UE-28838
#lockdown cristina.riveron
Change 2990314 on 2016/05/25 by Max.Chen
Movie Capture: Flush the viewport when grabbing frames. This fixes more frame accuracy issues.
#jira UE-31285
#lockdown Nick.Penwarden
Change 2990249 on 2016/05/25 by Max.Chen
Sequencer: Fix tick prerequisites getting removed on stop and not re-set on play. This fixes frame accuracies when rendering in a separate process.
#jira UE-31285
#lockdown Nick.Penwarden
Change 2990243 on 2016/05/25 by Lukasz.Furman
Fixed behavior tree observers not being applied correctly
#jira UE-31307
#lockdown Cristina.Riveron
Change 2990206 on 2016/05/25 by Daniel.Lamb
Make sure min number of threads in the large thread pool is at least 2.
#jira UE-31253
#lockdown Cristina.Riveron
Change 2990182 on 2016/05/25 by Max.Chen
Sequencer: Fix null ptr crash on trying to record from current player. This is a regression from the off by one frame fixes.
#jira UE-31304
#lockdown Nick.Penwarden
Change 2990124 on 2016/05/25 by Chris.Bunner
Avoid creating additional inline code fragment casting matching uniform types.
#lockdown cristina.riveron
#jira UE-29089
Change 2989978 on 2016/05/25 by Uriel.Doyon
Merged fix for issue with resolution scale in PostProcessVisualizeComplexity
#jira UE-29473
#lockdown cristina.riveron
Change 2989970 on 2016/05/25 by Taizyd.Korambayil
#lockdown cristina.riveron
#jira UE-31293 Added TestMaps Folder and moved all Non-Relevant Maps into it.
Change 2989911 on 2016/05/25 by Chris.Babcock
Remove warning about Android debugging since CodeWorks for Android Nsight supports VS2015
#jira UE-31292
#ue4
#android
#lockdown cristina.riveron
Change 2989898 on 2016/05/25 by Robert.Manuszewski
Splitting inline shader registration from serialization. Serialization can happen on the async loading thread but registration should only happen on the game thread. Removed a lot of critical section locks.
Reimplementing CL #2952596
#jira UE-29245
#lockdown Nick.Penwarden
Change 2989849 on 2016/05/25 by Max.Preussner
Sequencer: Fixed Crash when playing UMG sequence with audio tracks (UE-31289)
#jira UE-31289
#lockdown nick.penwarden
Change 2989793 on 2016/05/25 by Max.Chen
Sequencer: Change automated capture so it captures in response to a sequence update to fix off by one frames.
#jira UE-30755
#lockdown Nick.Penwarden
Change 2989792 on 2016/05/25 by Max.Chen
Sequencer: Put back setting MaxFPS when forcing fixed frame interval playback to fix motion blur in editor.
#jira UE-30755
#lockdown Nick.Penwarden
Change 2989774 on 2016/05/25 by Mike.Beach
Mirroring CL 2946932
Guarding against invalid EdGraphPins (ones that have been moved to the transient package) when constructing the widget - prevents a crash that we've been unable to repro or determine the cause of (turns it instead into an ensure, so we can collect more contextual information on the issue).
#lockdown cristina.riveron
#jira UE-26998
Change 2989765 on 2016/05/25 by Olaf.Piesche
Moivng CL 2967970 from Dev-Rendering - fix for
#jira UE-27297
#lockdown nick.penwarden
Change 2989481 on 2016/05/25 by Marc.Audy
Properly route AttachToComponent to SetupAttachment if called from the constructor
#jira UE-31055
#lockdown Cristina.Riveron
Change 2989369 on 2016/05/25 by Robert.Manuszewski
Don't create asset import data for archetype TileMap. Propagate component flags to TileMap if the component is an archetype.
#jira UE-31033
#lockdown Nick.Penwarden
Change 2988975 on 2016/05/24 by Max.Preussner
Sequencer: Fixed Cinematic Camera look at tool crashes on auto save (UE-31195)
#jira UE-31195
#lockdown nick.penwarden
Change 2988834 on 2016/05/24 by Max.Chen
Movie Capture: Crash fix - Protect against null encoding filter.
#jira UE-31233
#lockdown Nick.Penwarden
Change 2988764 on 2016/05/24 by Peter.Sauerbrei
fix for exception when deploying to tvOS from PC
#jira UE-30318
#lockdown cristina.riveron
Change 2988540 on 2016/05/24 by Jeff.Campeau
Disable incompatible OpenVR for Windows XP builds.
Gut SteamVR and SteamVRController for Windows XP builds (rely on OpenVR).
#lockdown Nick.Penwarden
#jira UE-30823
Change 2988491 on 2016/05/24 by Zak.Middleton
#ue4 - (4.12) Remove version check from serialization logic that fixes up stale transient properties. They would still loaded for archetypes and we always want to prevent that in the future.
#lockdown cristina.riveron
#jira UE-30625
Change 2988427 on 2016/05/24 by Aaron.McLeran
#jira UE-31028 Stop Quietest Concurrency does not remove the quietest sound
Fix is to not re-add the sound once its stopped due to max concurrency.
#tests ran the QA test map that demonstrated the problem
#lockdown cristina.riveron
Change 2988391 on 2016/05/24 by Taizyd.Korambayil
#lockdown cristina.riveron
#jira UE-30301 Rebuilt Ligthing for all Content Example Maps
Change 2988315 on 2016/05/24 by Allan.Bentham
Re-enabled FLUTBlenderPS on vulkan devices. (it's required for protostar)
#jira UE-31079
Change 2988227 on 2016/05/24 by Frank.Fella
Sequencer - Add support for forcing editor and runtime evaluation to happen on exact fixed frame intervals. Updated the subway sequencer sample to work with these changes.
Change missed in first checkin.
#Jira UE-30755
Change 2988200 on 2016/05/24 by Robert.Manuszewski
Assert if MaxObjectsInEditor or MaxObjectsInGame are too big and collide with EInternalObjectFlags
#jira UE-31218
Change 2988181 on 2016/05/24 by Peter.Sauerbrei
revert out the last fix and add more logging as I can't reproduce this bug
#jira UE-30813
Change 2988140 on 2016/05/24 by Frank.Fella
Sequencer - Add support for forcing editor and runtime evaluation to happen on exact fixed frame intervals. Updated the subway sequencer sample to work with these changes.
#Jira UE-30755
Change 2988081 on 2016/05/24 by Jamie.Dale
Better fix for UE-29651 that will also work with packages saved from a build without an engine version
There was no version bump for the change to FFormatArgumentData, but VER_UE4_K2NODE_VAR_REFERENCEGUIDS was added at almost the same time so testing that should handle the vast majority of packages that we have internally, and will handle all external packages.
#jira UE-29651
Change 2987964 on 2016/05/24 by Lee.Clark
Fix empty ENV path when compiling PS4 targets.
#jira UE-31210
Change 2987721 on 2016/05/23 by Dan.Oconnor
Reworking node validation change done in 2910382 so that nodes that are going to spawn other nodes in the expansion step are still validated.
#jira UE-31099
Change 2987696 on 2016/05/23 by Chris.Babcock
Update AndroidWorks 1R1 to CodeWorks for Android 1R4
#jira UEPLAT-1312
#ue4
#android
Change 2987624 on 2016/05/23 by Jeff.Campeau
Fix a define protection for WinXP stack walking support.
#jira UE-30823
Change 2987607 on 2016/05/23 by Jeff.Campeau
Windows Stack Walk fixed to work with Windows XP.
Use the ASCII calls where needed.
Symbol server is unsupported and is disabled when building for Windows XP.
#jira UE-30823
Change 2987593 on 2016/05/23 by Zak.Middleton
#ue4 - (4.12) Reject old serialized values of UMovementComponent::UpdatedComponent and UpdatedPrimitive that were saved before those were marked transient. Mark UPawnMovementComponent::PawnOwner and UCharacterMovementComponent::CharacterOwner as transient, and similarly reject old saved values.
#jira UE-30625
Change 2987548 on 2016/05/23 by Lukasz.Furman
Moved newly added gameplay debugger's code out of perception component
#jira UE-31090
Change 2987510 on 2016/05/23 by Lukasz.Furman
Restored perception category in old gameplay debugger tool
#jira UE-31090
Change 2987278 on 2016/05/23 by Ben.Marsh
Rocket: Add Mac GenerateProjectFiles.sh script into installed engine distro.
#jira UE-31109
Change 2987156 on 2016/05/23 by Chris.Babcock
Added GoogleVR to InstalledEngineFilters.ini
#jira UE-31186
#ue4
#android
Change 2987129 on 2016/05/23 by Mieszko.Zielinski
Fixed FNavigationFilterArea not zeroing its properties in default constuctor #UE4
#jira UE-31185
Change 2987100 on 2016/05/23 by Peter.Sauerbrei
fix for crash in DeploymentServer when attempting to copy a file with a space in the path or name
#jira UE-30813
Change 2987064 on 2016/05/23 by Dmitry.Rekman
PR #2164: [Linux] Fix clang '&&' within '||' error (Contributed by slonopotamus)
#jira UE-28537
Change 2987002 on 2016/05/23 by Aaron.McLeran
#jira UE-31036 Sound volume does not change when moving past the Non Focus Azimuth range if set to greater than 90 degrees
Fix was to remove the clamp on the dot-product
#tests ran test map with focus factors greater than 90 degrees
Change 2986880 on 2016/05/23 by Mark.Satterthwaite
Fix UE-31124 due to bad array iteration logic - amazing that this hadn't been seen earlier.
#jira UE-31124
Change 2986873 on 2016/05/23 by Lina.Halper
#fix issue with morphtarget importings for LODs
- this was caused by option not being set correctly
#jira: UE-30955
#code review: Alexis.Matte
Change 2986804 on 2016/05/23 by Taizyd.Korambayil
#jira UE-31132 Added Missing Function to Blueprint.
Change 2986801 on 2016/05/23 by Jamie.Dale
SSearchBox will now only delay text changes while it has focus
A text changed event when it doesn't have focus is usually triggered by code (rather than the user typing), so we need to process it immediately to avoid other operational ordering issues.
#jira UE-31101
Change 2986793 on 2016/05/23 by Martin.Wilson
Fix for morph curves not getting applied to meshes in cooked builds (smart names were not being corrected). (brought from dev-rendering 2983747)
#Jira UE-31166
Change 2986772 on 2016/05/23 by Benn.Gallagher
Fixed montage single node instances with negative rate scales only repeating the final section when looping
#jira UE-31164
Change 2986766 on 2016/05/23 by Martin.Wilson
Fix for preview not updating when tranform curve flags are changed.
#Jira UE-31119
Change 2986569 on 2016/05/23 by Robert.Manuszewski
Making hang detection disabled bu default and an opt-in for games.
#jira UE-31151
Change 2986564 on 2016/05/23 by Martin.Wilson
Fix for being able to set montages on an anim track segment.
#jira UE-31039
Change 2986205 on 2016/05/21 by Zabir.Hoque
Add new instrumentation to bucketize why we are seeing device lost so often.
#jira UE-20434
Change 2986071 on 2016/05/20 by Dan.Oconnor
Fix for TRASHCLASS sneaking into property list when recompiling a blueprint that has a dependency that is dirty and requires bytecode recompilation of its dependencies. Make sure that the dirty blueprint itself is part of the bytecode recompilation process and make sure that blueprints compiled in this way are compiled after their parent classes
#jira UE-30411
Change 2986068 on 2016/05/20 by Dan.Oconnor
Fix for blueprint change/compile delegates leaking
#jira UE-31118
Change 2986044 on 2016/05/20 by Zabir.Hoque
Make OpenGL VB allocation support alignment (16 by default). Future work should expose this up through the RHI layers.
#CodeReview: Olaf.Piesche, Simon.Tovey
#jira UE-29231
Change 2985934 on 2016/05/20 by Mark.Satterthwaite
Further changes to ensure that UE-30710 really is fixed while also not live-leaking memory in MetalRHI.
#jira UE-30710
Change 2985852 on 2016/05/20 by Max.Chen
Subway Sequencer: Remove level sequence editor from plugin list since it's on by default.
#jira UE-31106
Change 2985821 on 2016/05/20 by Phillip.Kavan
[UE-22874] Fix UObject duplication to preserve default subobjects created by the native class ctor when the root object is duplicated.
change summary:
- added FObjectDuplicationHelperMethods::GatherDefaultSubobjectsForDuplication()
- modified StaticDuplicateObjectEx() to map default subobjects created in the duplicated root object's ctor before entering the serialization pass. this preserves those instances instead of causing StaticConstructObject to destroy/recreate them during serialization as part of the UObject reference duplication logic.
#jira UE-22874
Change 2985750 on 2016/05/20 by Michael.Gay
Default Game map set to SubwaySequencer_P
#jira UE-31108
Change 2985660 on 2016/05/20 by Michael.Gay
Removing unused track animation
#jira UE-30804
Change 2985349 on 2016/05/20 by Dan.Oconnor
Fix for crash that occurs when repeatedly pasting and undoing an object with subobjects. We were not clearing the internal flags when recycling an object
#jira UE-30954
Change 2985346 on 2016/05/20 by Leslie.Nivison
Updating 4.12 credit
#jira UEPROD-820
Change 2985297 on 2016/05/20 by Jamie.Dale
Fixed VS version detection
It was checking the file version (which is 12), rather than the VS version (which is 12 for 2013, and 14 for 2015).
#jira UE-30977
Change 2985233 on 2016/05/20 by Gareth.Martin
Fixed crash when building lighting when using "Use Landscape Lightmap" on landscape grass
#jira UE-30975
Change 2985184 on 2016/05/20 by Chris.Babcock
Move audio warning to show proper error result code
#jira UE-31085
#ue4
#android
Change 2985183 on 2016/05/20 by Chad.Taylor
GoogleVR disabled by default
#jira UE-30921
Change 2985145 on 2016/05/20 by Jack.Porter
Fix for precision issue causing blocky landscape LOD on iPad Pro and several other iOS devices
#jira UE-24792
Change 2985124 on 2016/05/20 by Alex.Delesky
#jira UE-29794
If the editor cannot find the SSL DLLs when enabling the Perforce source control plugin, it will now display a warning in the Source Control log instead of crashing.
Change 2985066 on 2016/05/20 by Lee.Clark
Fix r.SelectiveBasePassOutputs so that it defaults to off
#jira UE-30133
Change 2985063 on 2016/05/20 by Allan.Bentham
Fix for modulated shadow precision issues on low end android hardware.
#jira UE-29083
Change 2985061 on 2016/05/20 by Max.Chen
Viewport: Fix crash when the viewport widget is null.
#jira UE-31050
Change 2985059 on 2016/05/20 by Rolando.Caloca
UE4.12 - Workaround for crash trying to track down other crash
#jira UE-30875
Change 2984876 on 2016/05/20 by Richard.TalbotWatkin
Made SceneOutliner visibility code safer, to avoid a potential crash.
#jira UE-30831 - [CrashReport] UE4Editor_SceneOutliner!SceneOutliner::FGetVisibilityVisitor::RecurseChildren() [sceneoutlinergutter.cpp:24]
Change 2984873 on 2016/05/20 by Richard.TalbotWatkin
Clipped selection box bounds in Matinee viewport to prevent crash when reading outside of the viewport area.
#jira UE-30968 - Ctrl+Alt selection drag inside to outside of Matinee window will crash the editor
Change 2984844 on 2016/05/20 by Matthew.Griffin
Fixing compile error in mono games
Change 2984825 on 2016/05/20 by Robert.Manuszewski
When the application crashes becaused the GPU driver was disabled, make sure the CrashReporterClient window gets the updated screen metrics after the driver is restored.
#jira UE-30556
Change 2984693 on 2016/05/20 by Phillip.Kavan
[UE-30495] Fix BP editor crash on component rename following undo of component add action.
change summary:
- modified USimpleConstructionScript::CreateNode() to create the initial component template object in the transient package, so that subsequent undo actions restore to that state rather than to a valid BPGC-owned state.
- modified StaticConstructObject_Internal() to restore the inclusion of RF_ArchetypeObject-flagged objects in the logic that sets new objects to 'PendingKill' state before recording them into the transaction buffer. this ensures that they can be GC'd when construction is undone in the editor. Tested against sample/repro steps in UE-21240 to ensure that it no longer crashes even with the original change from CL# 2832225 reverted (that fix has since been superceded).
#jira UE-30495
Change 2984684 on 2016/05/20 by Phillip.Kavan
[UE-30852] Fix BPGC custom property list delta generation & post-construct initialization/serialization to properly handle array values that differ from default in length but not inner element values.
change summary:
- modified UBlueprintGeneratedClass::BuildCustomPropertyListForPostConstruction()/BuildCustomArrayPropertyListForPostConstruction() to return a boolean value indicating whether or not a delta value was detected.
- modified UBlueprintGeneratedClass::BuildCustomArrayPropertyListForPostConstruction() and FBlueprintEditorUtils::BuildComponentInstancingData() to ensure that array properties are emitted to delta property lists if the size differs from default, even if none of the elements actually differ from the default value
- removed the ensure() for the array property case in FObjectInitializer::InitPropertiesFromCustomList(), as it is now a valid case to encounter an array property delta value without any actual delta element value overrides following it in the custom property stream
- restored the bCanUsePostConstructLink optimization for non-native class types in FObjectInitializer::InitProperties()
- modified UArrayProperty::SerializeItem() for the ArUseCustomPropertyList case to not empty the array when a resize is needed on load (read) - this fixes an edge case in the cooked BP component data stream when array size differed from default but only one or more of the inner values actually differed, in which case all the array slots were being reset (constructed/zeroed) but only the overridden value was being serialized (loaded) from the template data stream
#jira UE-30852
Change 2984651 on 2016/05/19 by Zabir.Hoque
Forcing GoogleVR plugin to disabled by default since its causing even non HDM machines to render split foveated viewports.
#CodeReview: Chad.Taylor, Nick.Whiting
#jira UE-30921
Change 2984636 on 2016/05/19 by Zabir.Hoque
Explicitly store the cubemap resolution in encoded reflection data.
#CodeReview Daniel.Wright, Marcus.Wassmer
#jira UE-30341
Change 2984454 on 2016/05/19 by Rolando.Caloca
UE4.12 - Fix for vulkan failing to load shader
Integration mirroring changelist 2984432
#jira UE-28140
Change 2984452 on 2016/05/19 by Marcus.Wassmer
#jira UE-31054
Remove autocompletion for ToggleRHIThread and ShowMaterialDrawEvents as they no longer do anything
Change 2984415 on 2016/05/19 by Dan.Oconnor
Fix for crash when we fail to spawn the preview actor because the desired class is deprecated
#jira UE-31027
Change 2984376 on 2016/05/19 by Dan.Oconnor
Fix for regression in GetClassDefaults - we were not handling the 'None' case
#jira UE-31034
Change 2984316 on 2016/05/19 by Aaron.McLeran
#jira UE-31049 Updating the Oculus Audio SDK to vs 1.02
#tests Ran updated SDK in several test maps, confirmed HRTF spatialization is working.
Change 2984315 on 2016/05/19 by Lina.Halper
Fix issue with importing morphtarget LOD when it's missing between
#jira: UE-30949
Change 2984237 on 2016/05/19 by Dan.Oconnor
Fix for ensure/possible stale memory access in UpdateOverlaps
#jira UE-30919
Change 2984170 on 2016/05/19 by Max.Chen
Movie Capture: Another pass at texture streaming fix for movie capture.
#jira UE-30986
Change 2984134 on 2016/05/19 by Chad.Taylor
Mac compiler warning fix
#jira UE-30921
Change 2983903 on 2016/05/19 by Taizyd.Korambayil
#jira UE-30562 Replaced cube With BSP for Floor
Change 2983840 on 2016/05/19 by Taizyd.Korambayil
#jira UE-30979 Fixed Typo in one of the Stands
Change 2983662 on 2016/05/19 by Ben.Marsh
GitHub: Add an exception to allow GoogleVR files to be mirrored to GitHub
Change 2983653 on 2016/05/19 by Chris.Bunner
Modifed previous change to fixup incorrect ensures.
#jira UE-30877
Change 2983599 on 2016/05/19 by Chris.Bunner
Added ensure and null ptr check to canvas flush.
#jira UE-30877
Change 2983596 on 2016/05/19 by Chad.Taylor
FluffyBunny
#jira UE-30921
Change 2983534 on 2016/05/19 by Brian.Karis
4.12 fix per pixel translucency
#jira UE-30902
Change 2983530 on 2016/05/19 by Chris.Babcock
Broadcast EMediaEvent::MediaOpened when media opened successfully
#jira UE-31006
#ue4
#android
Change 2983427 on 2016/05/19 by Richard.TalbotWatkin
Conflated "Import" and "Import Scene" in the File menu; the new action is called "Import Into Level". Limited the allowed file types to .t3d and .fbx.
#jira UE-30891 - CRASH: Editor crashes when Importing Actors via File > Import
Change 2983386 on 2016/05/19 by Michael.Gay
minor last tweaks
#jira UE-30804
Change 2983280 on 2016/05/19 by Gil.Gribb
UE4 - Fixed crash in FHierarchicalStaticMeshSceneProxy related to reflection captures and foliage.
#jira UE-30837
Change 2983079 on 2016/05/18 by Max.Chen
Movie Capture: Fix so that texture streaming option for movie capture is set when capturing in editor.
#jira UE-30986
Change 2983078 on 2016/05/18 by Dmitriy.Dyomin
Added more logging to track UE-30878
#jira UE-30878
Change 2983067 on 2016/05/18 by Dmitriy.Dyomin
Fixed: Mobile HDR Path doesn't work on GearVR
#jira UE-11846
Change 2983049 on 2016/05/18 by Max.Chen
Movie Capture: Fix crash on movie rendering when in HDR mode.
#jira UE-30978
Change 2982825 on 2016/05/18 by Mark.Satterthwaite
Correctly wait for the dispatch semaphore when clearing the Metal resource free lists.
#jira UE-30710
Change 2982697 on 2016/05/18 by Marc.Audy
Fix Orion DataProvider use of AddReferencedObjects in light of CL# 2982607
#jira UE-00000
Change 2982546 on 2016/05/18 by Taizyd.Korambayil
#jira UE-30862 resaved A bunc hof assets to Fix to attempt to fix Build Warnings
Change 2982533 on 2016/05/18 by Daniel.Lamb
When you package if you haven't saved the changes will not be reflected in the game.
#jira UE-30904
Change 2982415 on 2016/05/18 by Marc.Audy
Bring forgotten 4.11 CL# 2928377 to 4.12
Ensure that the compiler will throw an error when passing a non-UObject* TArray to AddReferencedObjects
#jira UE-28933
Change 2982358 on 2016/05/18 by Taizyd.Korambayil
#jira UE-30546 Updated TP_VehicleAdvPawn Chase Camera Location
Change 2982280 on 2016/05/18 by Martin.Mittring
UE-26409 Crash when Light Propagation Volume Plugin is disabled on a Project
#jira:UE-26409
Change 2982229 on 2016/05/18 by Max.Chen
Sequencer: Add tick prerequisites so that the level sequence actor ticks before all of the actors that it controls. This fixes some inconsistencies in the movie rendered frames not matching what's in editor.
#jira UE-30755
Change 2982080 on 2016/05/18 by Max.Chen
Sequence Recorder: Fix crash when component class to record is null.
#jira UE-30944
Change 2982041 on 2016/05/18 by Marcus.Wassmer
Protect against crashes reading from a null texture.
#jira UE-30834
Change 2981915 on 2016/05/18 by Allan.Bentham
Do not mosaic encode for modulate blend operations.
Fixes dark 'halos' around mod shadows.
#jira UE-29083
Change 2981911 on 2016/05/18 by michael.gay
Set framing in sequencer, set start to 200
#jira UE-30633
Change 2981904 on 2016/05/18 by Chase.McAllister
#jira UE-30943 Removing unused asset to fix DDC compiling bug
Change 2981894 on 2016/05/18 by Michael.Gay
removed old cameras, changed start frame to remove black at head of sequence
#jira UE-30633
Change 2981827 on 2016/05/18 by Gareth.Martin
Fixed crash when entering landscape mode while a landscape is selected while simulating
- Landscape infos no longer get created for PIE/Simulate landscapes (they were empty anyway)
#jira UE-30917
Change 2981725 on 2016/05/18 by Keith.Judge
Xbox One - Fix issues with DFAO/DF Shadowing. Problems were in RHIUpdateTexture3D(). Needed to ensure temp texture had the correct bind flags, etc, and also use the graphics context rather than the DMA context to do the copying, as for some reason the DMA engine corrupts some pixels of the distance field atlas texture.
#jira UE-27591
Change 2981466 on 2016/05/17 by Max.Chen
Merge from Chris Bunner from Dev-SequencerGDC - Frame state fixes when Sequencer is paused; No velocity in AA, Clamp motion blur scale, Clamp to scatter blur method.
#jira UE-30576
Change 2981403 on 2016/05/17 by Dan.Oconnor
Fix for overzealous filtering of classes with Within markup
#jira UE-29878
Change 2981342 on 2016/05/17 by Dan.Oconnor
Removing overzealous check. In Dev-BP this has already been downgraded to an ensure, but no reason to ensure now that we understand why it happens.
#jira UE-30792
Change 2981318 on 2016/05/17 by Max.Preussner
Sequencer: Fixed crash when scrubbing attached audio tracks; reduced nesting (UE-30923)
#jira: UE-30923
Change 2981221 on 2016/05/17 by Dan.Oconnor
Preventing spawning components with 'Within' markup specified, it is unsupported by the SCSEditor and Core UObject logic at this time. Likely logic is CoreUObject needs to avoid type checking for RF_ArchetypeObject instances and the SCSEditor needs to be more consistent about using that flag on its template objects
#jira UE-29878
Change 2981169 on 2016/05/17 by Marc.Audy
Gracefully handle invalid GameSingleton class name in ini file
Remove unused DefaultPreviewPawnClass and ClassName from Engine
#jira UE-30829
Change 2981104 on 2016/05/17 by Mieszko.Zielinski
Made AISenses not send information to listeners that are not registered for given sense #UE4
#jira UE-29939
Change 2981086 on 2016/05/17 by Taizyd.Korambayil
#jira UE-30568 Added a check to make sure index being accessed was valid (BP_DemoRoom)
Change 2980755 on 2016/05/17 by Taizyd.Korambayil
#jira UE-30706 Set material to use Translucent Blend
Change 2980753 on 2016/05/17 by Jon.Nabozny
Initialize FBox used to store result for CalculateQuatACF96Bounds (bump from //UE4/Dev-Framework).
#JIRA UE-30846
Change 2980682 on 2016/05/17 by Taizyd.Korambayil
#jira UE-30570, UE-30575 Corrected Some Spellings
Change 2980559 on 2016/05/17 by Mieszko.Zielinski
Changed UNavigationSystem.AgentToNavDataMap to store weak object pointers rather than raw painters #UE4
This should make it immune to navigation data beging destroyed and not removed from AgentToNavDataMap.
#jira UE-30836
Change 2980504 on 2016/05/17 by Daniel.Wright
Integrate - Movable skylight now matches stationary for subsurface shading models
* Two sided was broken in 4.11, Subsurface had never been handled
#jira UE-30855
Change 2980467 on 2016/05/17 by Jamie.Dale
Added some checks to avoid temporary worlds being added as favorites
#jira UE-30613
Change 2980379 on 2016/05/17 by Jurre.deBaare
Fix for static mesh merging, little too eager with changes.
#jira UE-30808
Change 2980373 on 2016/05/17 by Gareth.Martin
Fixed shader compile errors when applying a speedtree material to a landscape spline
#jira UE-25820
Change 2980318 on 2016/05/17 by Gareth.Martin
Fixed crash when calling EditorApplySpline with a null spline component
Also stopped it doing anything in PIE (it's for blutilities, not runtime)
#jira UE-30830
Change 2980300 on 2016/05/17 by Marc.Audy
Treat Unreachable components the same as BeginDestroyed for endplay/cleanup purposes
#jira UE-30839
Change 2980298 on 2016/05/17 by Gareth.Martin
Fixed crash when loading landscape projects that used tessellation
#jira UE-30742
Change 2980296 on 2016/05/17 by Martin.Wilson
Fix crash accessing sync names from a child anim bp
#jira UE-30811
Change 2980289 on 2016/05/17 by Jurre.deBaare
Fix for regression with merge actor tab
#jira UE-30809
Change 2980272 on 2016/05/17 by Ori.Cohen
Make sure that root components do not get attached to non root components in the same actor. Fixes crash in scene outliner and other weird issues.
#JIRA UE-30876
Change 2980206 on 2016/05/17 by Keith.Judge
Xbox One - Bit the bullet and rewrote the occlusion query buffer handling so that we're not reliant on a finite ring buffer. Instead, each query has a small buffer of its own. removing the dependency of ordering when reading back the results. This should save memory on smaller maps too!
#jira UE-30581
#jira UEPLAT-623
Change 2980094 on 2016/05/17 by Matthew.Griffin
Added OSVR dlls to InstalledEngineFilters.ini so that they are included in Launcher build even though the plugin is disabled by default
#jira UE-30611
Change 2979935 on 2016/05/17 by Aaron.Herzog
#jira UE-30619 updating owen sk mesh with proper morph
Change 2979816 on 2016/05/16 by Chad.Taylor
Fix to address a crash related to multiple player VR Preview
#jira UE-20109
Change 2979744 on 2016/05/16 by Mike.Beach
Disabling Blueprint spawning, InitProperties() optimization until we can figure out why it is not filling out array properties properly.
#jira UE-30745
Change 2979743 on 2016/05/16 by Mike.Beach
Mirroring CL 2977497
Clearing property nodes and cached read-addresses when changing the details view object (so any queued actions will not operate on invalid properties).
#jira UE-26392
Change 2979544 on 2016/05/16 by Daniel.Wright
Fixed crash with RTDF shadows when r.DistanceFieldAO was disabled
#jira UE-26319
Change 2979477 on 2016/05/16 by michael.gay
Remove errant Play Rate track.
#jira UE-30633
Change 2979464 on 2016/05/16 by Mark.Satterthwaite
Duplicate CL #2945444: Cache the Metal fallback depth-stencil surface for the canvas tile rendering so that we only ever keep one spare depth-stencil surface around. This costs us a little more permanent memory but reduces churn.
#jira UE-30849
Change 2979441 on 2016/05/16 by Rolando.Caloca
UE4.12 - vk - Fix quitting taking a long time
#jira UE-28239
Change 2979315 on 2016/05/16 by Michael.Trepka
Rollback //UE4/Release-4.12/Engine/Source/Programs/UnrealBuildTool/System/XcodeProject.cs to revision 1
#jira UE-28016
Change 2979304 on 2016/05/16 by Jamie.Dale
Backing out some changes from CL# 2976673
These caused an issue with Slate hit-testing. The more correct fix here is to make the Slate Windows OS layer treat window positions as relative to the top-left of the window client area, rather than relative to the top-left of the window itself (which includes the OS border). This now matches what other platforms do.
To this end, FWindowsWindow::Initialize, FWindowsWindow::MoveWindowTo, and FWindowsWindow::ReshapeWindow all now consider the given window position to be relative to the window client area, and will consistently adjust it to relative to the window before moving/creating the OS window. This only impacts windows with OS borders (aka, non-fullscreen and non-Slate drawn windows).
#jira UE-30276
#jira UE-30677
#jira UE-30771
Change 2979077 on 2016/05/16 by Maciej.Mroz
#jira UE-28536 Attached Project Crashes on Attempting to Play in Standalone
merged from 2979069
Change 2979052 on 2016/05/16 by Chase.McAllister
#jira UE-30789 Resaving Maps to fix project warning
Change 2978984 on 2016/05/16 by Chase.McAllister
#jira UE-30789 Resaving start video assests that contained empty engine version
Change 2978806 on 2016/05/16 by Mieszko.Zielinski
Fixed EQS tests' scoring equation value getting reset on load #UE4
#jira UE-30470
Change 2978670 on 2016/05/16 by Max.Preussner
Media: Workaround for changing Media asset path can cause crash (UE-22691)
#jira: UE-22691
Change 2978638 on 2016/05/16 by Michael.Gay
Cleanup of old maps in SubwaySequencer project
#jira UE-30633
Change 2978636 on 2016/05/16 by Jamie.Dale
Added guard against a crash navigating through a menu
#jira UE-30698
Change 2978611 on 2016/05/16 by Lee.Clark
PS4 - Fix RenderTargetOutputFormat using the wrong output index for velocity rendering when using r.BasePassOutputsVelocity=True
#jira UE-30133
Change 2978596 on 2016/05/16 by Allan.Bentham
Extend iOS metal Z bias offset to all iOS (metal+gles) depth only shaders.
#jira UE-27530
Change 2978566 on 2016/05/16 by Jamie.Dale
Downgraded some checks to ensures and added more logging
#jira UE-30613
Change 2978399 on 2016/05/16 by Keith.Judge
Xbox One - Fix check() firing when we run out of occlusion buffer space. Also added occlusion query result caching (perf gain!).
#jira UE-30581
Change 2978323 on 2016/05/16 by Jurre.deBaare
Merge actor panel crashes when selecting a mesh component without static mesh
#fix display 'No Static Mesh' when none is available
#jira UE-30809
Change 2978322 on 2016/05/16 by Jurre.deBaare
Issue with merging meshes resulting data saved across different LOD levels
#fix use correct target LOD index for all source LODs
#jira UE-30808
#lockdown Nick.Penwarden
[CL 2999693 by Ben Marsh in Main branch]
2016-06-03 11:49:20 -04:00
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER Enqueue SL_PlayerBufferQueue 0x%x params( %p, %d) " ) , result , Buffer - > AudioData , int32 ( Buffer - > GetSize ( ) ) ) ;
2016-03-17 11:10:14 -04:00
if ( bLoop )
{
result = ( * SL_PlayerBufferQueue ) - > RegisterCallback ( SL_PlayerBufferQueue , NULL , NULL ) ;
}
return false ;
}
2014-03-14 14:13:41 -04:00
bStreamedSound = false ;
bHasLooped = false ;
bBuffersToFlush = false ;
return true ;
}
2015-06-05 16:09:35 -04:00
bool FSLESSoundSource : : ReadMorePCMData ( const int32 BufferIndex , EDataReadMode DataReadMode )
2014-08-28 11:18:51 -04:00
{
2015-06-05 16:09:35 -04:00
USoundWave * WaveData = WaveInstance - > WaveData ;
2014-08-28 11:18:51 -04:00
if ( WaveData & & WaveData - > bProcedural )
{
2015-06-05 16:09:35 -04:00
const int32 MaxSamples = BufferSize / sizeof ( int16 ) ;
if ( DataReadMode = = EDataReadMode : : Synchronous | | WaveData - > bCanProcessAsync = = false )
{
const int32 BytesWritten = WaveData - > GeneratePCMData ( AudioBuffers [ BufferIndex ] . AudioData , MaxSamples ) ;
AudioBuffers [ BufferIndex ] . AudioDataSize = BytesWritten ;
}
else
{
RealtimeAsyncTask = new FAsyncRealtimeAudioTask ( WaveData , AudioBuffers [ BufferIndex ] . AudioData , MaxSamples ) ;
RealtimeAsyncTask - > StartBackgroundTask ( ) ;
}
// we're never actually "looping" here.
return false ;
2014-08-28 11:18:51 -04:00
}
else
{
2015-06-05 16:09:35 -04:00
if ( DataReadMode = = EDataReadMode : : Synchronous )
{
return Buffer - > ReadCompressedData ( AudioBuffers [ BufferIndex ] . AudioData , WaveInstance - > LoopingMode ! = LOOP_Never ) ;
}
else
{
RealtimeAsyncTask = new FAsyncRealtimeAudioTask ( Buffer , AudioBuffers [ BufferIndex ] . AudioData , WaveInstance - > LoopingMode ! = LOOP_Never , DataReadMode = = EDataReadMode : : AsynchronousSkipFirstFrame ) ;
RealtimeAsyncTask - > StartBackgroundTask ( ) ;
return false ;
}
2014-08-28 11:18:51 -04:00
}
}
2014-03-14 14:13:41 -04:00
bool FSLESSoundSource : : EnqueuePCMRTBuffer ( bool bLoop )
{
if ( AudioBuffers [ 0 ] . AudioData | | AudioBuffers [ 1 ] . AudioData )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " Enqueue PCMRT with buffers already allocated " ) ) ;
}
FMemory : : Memzero ( AudioBuffers , sizeof ( SLESAudioBuffer ) * 2 ) ;
// Set up double buffer area to decompress to
2014-08-28 11:18:51 -04:00
BufferSize = Buffer - > GetRTBufferSize ( ) * Buffer - > NumChannels ;
2014-03-14 14:13:41 -04:00
2014-08-28 11:18:51 -04:00
AudioBuffers [ 0 ] . AudioData = ( uint8 * ) FMemory : : Malloc ( BufferSize ) ;
AudioBuffers [ 0 ] . AudioDataSize = BufferSize ;
2014-08-18 09:13:38 -04:00
2014-08-28 11:18:51 -04:00
AudioBuffers [ 1 ] . AudioData = ( uint8 * ) FMemory : : Malloc ( BufferSize ) ;
AudioBuffers [ 1 ] . AudioDataSize = BufferSize ;
2014-03-14 14:13:41 -04:00
2015-06-05 16:09:35 -04:00
// Only use the cached data if we're starting from the beginning, otherwise we'll have to take a synchronous hit
if ( WaveInstance - > WaveData & & WaveInstance - > WaveData - > CachedRealtimeFirstBuffer & & WaveInstance - > StartTime = = 0.f )
{
FMemory : : Memcpy ( ( uint8 * ) AudioBuffers [ 0 ] . AudioData , WaveInstance - > WaveData - > CachedRealtimeFirstBuffer , BufferSize ) ;
2016-03-17 11:10:14 -04:00
ReadMorePCMData ( 1 , EDataReadMode : : AsynchronousSkipFirstFrame ) ;
2015-06-05 16:09:35 -04:00
}
else
{
ReadMorePCMData ( 0 , EDataReadMode : : Synchronous ) ;
2015-06-16 11:13:47 -04:00
ReadMorePCMData ( 1 , EDataReadMode : : Asynchronous ) ;
2015-06-05 16:09:35 -04:00
}
2014-03-14 14:13:41 -04:00
SLresult result ;
// callback is used to submit and decompress next buffer
result = ( * SL_PlayerBufferQueue ) - > RegisterCallback ( SL_PlayerBufferQueue , OpenSLBufferQueueCallback , ( void * ) this ) ;
// queue one sound buffer, as that is all Android will accept
if ( result = = SL_RESULT_SUCCESS )
{
result = ( * SL_PlayerBufferQueue ) - > Enqueue ( SL_PlayerBufferQueue , AudioBuffers [ 0 ] . AudioData , AudioBuffers [ 0 ] . AudioDataSize ) ;
2015-01-20 10:09:11 -05:00
if ( result ! = SL_RESULT_SUCCESS ) { UE_LOG ( LogAndroidAudio , Warning , TEXT ( " FAILED OPENSL BUFFER Enqueue SL_PlayerBufferQueue 0x%x params( %p, %d) " ) , result , Buffer - > AudioData , int32 ( Buffer - > GetSize ( ) ) ) ; return false ; }
2014-03-14 14:13:41 -04:00
}
else
{
return false ;
}
bStreamedSound = true ;
bHasLooped = false ;
bBuffersToFlush = false ;
BufferInUse = 1 ;
return true ;
}
/**
* Initializes a source with a given wave instance and prepares it for playback .
*
2015-01-20 10:09:11 -05:00
* @ param WaveInstance wave instance being primed for playback
2014-03-14 14:13:41 -04:00
* @ return TRUE if initialization was successful , FALSE otherwise
*/
bool FSLESSoundSource : : Init ( FWaveInstance * InWaveInstance )
{
// don't do anything if no volume! THIS APPEARS TO HAVE THE VOLUME IN TIME, CHECK HERE THOUGH IF ISSUES
if ( InWaveInstance & & ( InWaveInstance - > Volume * InWaveInstance - > VolumeMultiplier ) < = 0 )
{
return false ;
}
if ( Buffer & & Buffer - > ResourceID = = 0 )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " InitSoundSouce with Buffer already allocated " ) ) ;
delete Buffer ;
Buffer = 0 ;
}
if ( SL_PlayerObject )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " InitSoundSouce with PlayerObject not NULL, possible leak " ) ) ;
}
// Find matching buffer.
Buffer = FSLESSoundBuffer : : Init ( ( FSLESAudioDevice * ) AudioDevice , InWaveInstance - > WaveData ) ;
if ( Buffer & & InWaveInstance - > WaveData - > NumChannels < = 2 & & InWaveInstance - > WaveData - > SampleRate < = 48000 )
{
SCOPE_CYCLE_COUNTER ( STAT_AudioSourceInitTime ) ;
bool bFailedSetup = false ;
if ( CreatePlayer ( ) )
{
2015-01-20 10:09:11 -05:00
WaveInstance = InWaveInstance ;
2015-12-10 16:56:55 -05:00
if ( WaveInstance - > StartTime > 0.f )
{
Buffer - > Seek ( WaveInstance - > StartTime ) ;
}
2014-03-14 14:13:41 -04:00
switch ( Buffer - > Format )
{
case SoundFormat_PCM :
bFailedSetup | = ! EnqueuePCMBuffer ( InWaveInstance - > LoopingMode ! = LOOP_Never ) ;
break ;
case SoundFormat_PCMRT :
bFailedSetup | = ! EnqueuePCMRTBuffer ( InWaveInstance - > LoopingMode ! = LOOP_Never ) ;
break ;
default :
bFailedSetup = true ;
}
}
else
{
bFailedSetup = true ;
}
// clean up the madness if anything we need failed
if ( bFailedSetup )
{
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " Setup failed %s " ) , * InWaveInstance - > WaveData - > GetName ( ) ) ;
DestroyPlayer ( ) ;
return false ;
}
Update ( ) ;
// Initialization was successful.
return true ;
}
else
{
// Failed to initialize source.
// These occurences appear to potentially lead to leaks
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " Init SoundSource failed on %s " ) , * InWaveInstance - > WaveData - > GetName ( ) ) ;
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " SampleRate %d " ) , InWaveInstance - > WaveData - > SampleRate ) ;
UE_LOG ( LogAndroidAudio , Warning , TEXT ( " Channels %d " ) , InWaveInstance - > WaveData - > NumChannels ) ;
if ( Buffer & & Buffer - > ResourceID = = 0 )
{
delete Buffer ;
Buffer = 0 ;
}
}
return false ;
}
FSLESSoundSource : : FSLESSoundSource ( class FAudioDevice * InAudioDevice )
: FSoundSource ( InAudioDevice ) ,
Device ( ( FSLESAudioDevice * ) InAudioDevice ) ,
Buffer ( NULL ) ,
bStreamedSound ( false ) ,
bBuffersToFlush ( false ) ,
2014-08-28 11:18:51 -04:00
BufferSize ( 0 ) ,
2014-03-14 14:13:41 -04:00
BufferInUse ( 0 ) ,
2015-07-13 16:50:26 -04:00
VolumePreviousUpdate ( - 1.0f ) ,
2014-03-14 14:13:41 -04:00
bHasLooped ( false ) ,
SL_PlayerObject ( NULL ) ,
SL_PlayerPlayInterface ( NULL ) ,
SL_PlayerBufferQueue ( NULL ) ,
2015-06-19 03:58:19 -04:00
SL_VolumeInterface ( NULL ) ,
RealtimeAsyncTask ( NULL )
2014-03-14 14:13:41 -04:00
{
FMemory : : Memzero ( AudioBuffers , sizeof ( AudioBuffers ) ) ;
}
/**
* Clean up any hardware referenced by the sound source
*/
FSLESSoundSource : : ~ FSLESSoundSource ( void )
{
DestroyPlayer ( ) ;
ReleaseResources ( ) ;
}
void FSLESSoundSource : : ReleaseResources ( )
{
2015-06-05 16:09:35 -04:00
if ( RealtimeAsyncTask )
{
RealtimeAsyncTask - > EnsureCompletion ( ) ;
delete RealtimeAsyncTask ;
RealtimeAsyncTask = nullptr ;
}
2014-03-14 14:13:41 -04:00
FMemory : : Free ( AudioBuffers [ 0 ] . AudioData ) ;
FMemory : : Free ( AudioBuffers [ 1 ] . AudioData ) ;
FMemory : : Memzero ( AudioBuffers , sizeof ( AudioBuffers ) ) ;
if ( Buffer & & Buffer - > ResourceID = = 0 )
{
delete Buffer ;
}
Buffer = NULL ;
}
/**
* Updates the source specific parameter like e . g . volume and pitch based on the associated
* wave instance .
*/
void FSLESSoundSource : : Update ( void )
{
SCOPE_CYCLE_COUNTER ( STAT_AudioUpdateSources ) ;
if ( ! WaveInstance | | Paused )
{
return ;
}
2014-05-29 17:45:17 -04:00
2015-05-30 15:05:31 -04:00
float Volume = WaveInstance - > Volume * WaveInstance - > VolumeMultiplier ;
if ( SetStereoBleed ( ) )
2014-03-14 14:13:41 -04:00
{
2015-05-30 15:05:31 -04:00
// Emulate the bleed to rear speakers followed by stereo fold down
Volume * = 1.25f ;
2014-03-14 14:13:41 -04:00
}
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3038004)
#rb None
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3021479 on 2016/06/21 by Marc.Audy
Fix child actor properties set in the parent's construction script from being wiped out (4.12)
#jira UE-31956
Change 3021703 on 2016/06/21 by Marc.Audy
Fix crash due to copying properties to registered components and then reregistering them. (4.12)
#jira UE-31973
Change 3022105 on 2016/06/21 by Jeremy.Ernst
-new test assets for James for PSD node
Change 3022621 on 2016/06/22 by James.Golding
Add AnimBP for testing PSD
Change 3022622 on 2016/06/22 by James.Golding
Only restrict anim asset selection for UAnimGraphNode_AssetPlayerBase derived nodes
Change 3022656 on 2016/06/22 by James.Golding
UE-30537 Fix solid collision geom drawing not working when mirrored
Change 3022657 on 2016/06/22 by James.Golding
Don't crash in FAnimGraphNodeDetails::OnShouldFilterAnimAsset if AnimAsset doesn't have Skeleton asset registry tag (shouldn't happen, but shouldn't crash)
Change 3022663 on 2016/06/22 by James.Golding
UE-31283 Additional extensibility for anim and physics
PR #2434: Morpheme integration changes (Contributed by NaturalMotionTechnology)
Change 3022683 on 2016/06/22 by James.Golding
- Change OrientationDriver to always use PoseAsset for target poses
- Remove NumPoses from PoseAsset and use GetAssetRegistryTags instead
Change 3022891 on 2016/06/22 by mason.seay
Test asset for component hit
Change 3023203 on 2016/06/22 by mason.seay
Updated map to use more noticeable sound assets
Change 3023335 on 2016/06/22 by Marc.Audy
Use AddReferencedObjects instead of iterating array manuallly
Change 3023351 on 2016/06/22 by Ori.Cohen
Fix the case where physics hit events were passing the wrong component's bone info to the hit event.
#JIRA UE-32376
Change 3023368 on 2016/06/22 by mason.seay
Renamed actors in World Outliner
Change 3023425 on 2016/06/22 by mason.seay
Moved asset to new folder and fixed deprecated node
Change 3023429 on 2016/06/22 by mason.seay
Disabled collision on proc mesh
Change 3023553 on 2016/06/22 by Jon.Nabozny
Fix issue where MaxAngularVelocity resets to default on UPrimitiveComponent->BodyInstance. Replicated from CL 3009477.
#JIRA UE-31670
Change 3024669 on 2016/06/23 by James.Golding
Update PSD test assets (removing unused)
Change 3024864 on 2016/06/23 by Marc.Audy
Audio Threading!
Change 3024877 on 2016/06/23 by James.Golding
PR #2375: Allow the creation of custom IStreamingManager (Contributed by bozaro)
Change 3024880 on 2016/06/23 by James.Golding
PR #2209: Fix UGameplayStatics::*Game*Slot documentation (Contributed by Lectem)
Change 3024939 on 2016/06/23 by James.Golding
- Add SwingOnly options to OrientationDriver
- Move EBoneAxis from AnimNode_RotationMultiplier.h to AnimTypes.h
- Calculate gaussian radius per pose, not globally
Change 3024940 on 2016/06/23 by James.Golding
PoseAsset editor improvements
- Replace pose edit box with inline-editable style (with validation)
- Add filter highlight
- Show curve values for each pose when selected
- Add different background for curve list
- Filter box only searches pose list, moved location to indicate that
Change 3024949 on 2016/06/23 by James.Golding
Small update to PSD test AnimBP
Change 3025002 on 2016/06/23 by Ori.Cohen
Fix the case where fixed frame rate combined with t.maxfps would lead to negative delta time. We now take the min of t.maxfps and fixed frame rate.
#JIRA UE-32219
Change 3025214 on 2016/06/23 by mason.seay
Updated Character Movement Map
Change 3025319 on 2016/06/23 by Ori.Cohen
Make sure changing skeletal mesh updates the bone index on body instances already created.
Change 3025435 on 2016/06/23 by Ori.Cohen
Fix welded bodies not updating their collision profile when calling SetCollisionProfile
#JIRA UE-32394
Change 3025581 on 2016/06/23 by mason.seay
Test asset for slicing procedural mesh
Change 3026483 on 2016/06/24 by Marc.Audy
Don't reschedule multiple times tick functions used as prerequisites
#jira UE-32414
Change 3026498 on 2016/06/24 by mason.seay
Updating blueprint for bug repro
Change 3026547 on 2016/06/24 by Thomas.Sarkanen
Fixed crash in FKismetDebugUtilities::GetWatchText()
Crash reported by this UDN: https://udn.unrealengine.com/questions/300110/crash-in-kismetdebugutilities-when-printing-watchp.html
Change 3026598 on 2016/06/24 by James.Golding
Double clicking on poses now toggles them between 1.0 and 0.0 strength
Change 3026768 on 2016/06/24 by Marc.Audy
Change up suspend audio thread cvar sink warning about disabled threading to avoid inappropriate warnings
#jira UE-32468
Change 3026802 on 2016/06/24 by Lina.Halper
#Pose Asset work
# additive blending change : additive scale is saved to [targetscale/sourcescale - 1] where it used to be [targetscale/sourcescale] since blending doesn't work with it
- Blending should work once we save to [targetscale/sourcescale - 1] as normal - i.e. if you blend 0.3, it should not shrink the mesh because you applyed additive to 0.3
- When apply the scale to base, it should multiply [additive scale + 1 ] where additive scale is [targetscale/sourcescale - 1]
- Changed FTransform::Blend to FTransform::Lerp since it's literally just Lerp. Name Blend should be used for Accumulate but changing the name now is dangerous, so I'm keeping Accumulate but changed Blend to Lerp
# pose asset preview fix
- made sure it adds to curve, so you don't have to use delegate to apply
- PreviewOverride is now added to output curve, so we don't have to apply that curve later
- only reason of anim instance delegate is now for normal anim blueprint.
#pose asset change
- Curve extraction happens with ExtractContext, the output curve is stricly output curve
- Pose Asset supports Shrink now, but only shrink if full pose
- Added PoseHandler to handle most of common stuff between different pose nodes
- Still have to work on how to update pose asset - wip
- todo: clean up single node player to handle pose asset in a function
#code review:Martin.Wilson, James.Golding
Change 3026978 on 2016/06/24 by Lina.Halper
- Delete DrivePose Curve type
- Renamed TriggerEvent to DriveAttribute for consistency
- Replaced drive pose to drive attribute
- right now it can't have 0 curve type flags, so everything is DriveAttribute
#code review: James.Golding, Martin.Wilson
Change 3027113 on 2016/06/24 by mason.seay
Test Pose Assets
Change 3027454 on 2016/06/24 by Aaron.McLeran
UE-32492 Fix for cleaning up xaudio2 source voices and xaudio2 buffers if the source fails to initialize
https://answers.unrealengine.com/questions/441080/audio-crash.html
http://crashreporter/Crashes/Show/5689478
Change 3027519 on 2016/06/24 by Lina.Halper
Reverted FTransform name change as that causes compile errors due to lack of deprecated messages
- not worth to keep the old functions and add new one
#code review: Martin.Wilson
Change 3027887 on 2016/06/25 by Lina.Halper
Fix clang build warning
Change 3028703 on 2016/06/27 by Lukasz.Furman
gameplay debugger config improvements, categories and extensions can now be toggled while PIE/simulate is active
#ue4
Change 3028792 on 2016/06/27 by Lukasz.Furman
compilation fix for gameplay debugger
Change 3028950 on 2016/06/27 by Lukasz.Furman
compilation fix for gameplay debugger
Change 3029003 on 2016/06/27 by Ori.Cohen
Added PhysicalAnimation component that allows us to physically drive skeletal mesh from animation
Change 3029019 on 2016/06/27 by Lina.Halper
Update pose from source asset
Change 3029094 on 2016/06/27 by Marc.Audy
If Player->StartSpot is null disregard ShouldSpawnAtStartPoint returned true.
Change 3029308 on 2016/06/27 by Jeremy.Ernst
-adding test animation for PSD node. Has morphs built in to compare against driver result
Change 3029372 on 2016/06/27 by Marc.Audy
Fix compile error after merge
Also just fix the logic to be explicit rather than using suppression for static analysis warning
Change 3029493 on 2016/06/27 by Ori.Cohen
Move PhysicsAsset.h out of public engine header.
Change 3029550 on 2016/06/27 by Lina.Halper
Fix crash with Nan when additive blending of poses\
Change 3029659 on 2016/06/27 by Aaron.McLeran
Adding new minor feature to add new concurrency mode
- stop by lowest priorty but prevent new rather than stop oldest.
Change 3029673 on 2016/06/27 by Aaron.McLeran
#JIRA FORT-24936 Disable EQ on AMD machines since it is causing them to stall and starve other important threads. This is only a temporary solution until a better one is found.
Implementation in CL 3024124
Change 3030470 on 2016/06/28 by Ori.Cohen
Fix OnConstraintBrokenWrapper being accidently wrapped with if WITH_CLOTHING
#JIRA UE-32561
Change 3030586 on 2016/06/28 by Lina.Halper
Preview curve fix from anim curve viewer
#code review: Martin.Wilson
Change 3031054 on 2016/06/28 by Aaron.McLeran
#jira UE-32566 Incorrectly copied CL 3024124 to Dev-Framework
Change 3031535 on 2016/06/28 by mason.seay
Re-saving concurrency asset
Change 3031691 on 2016/06/28 by Marc.Audy
Fix stat sounds not turning on correctly unless a sort was specified
#jira UE-32597
Change 3031883 on 2016/06/28 by Zak.Middleton
#ue4 - Prevent bNotifyJumpApex from being editable, and clean up comments.
Change 3031898 on 2016/06/28 by Zak.Middleton
#ue4 - Fix mesh smoothing on clients popping briefly when crouching. This was due to the change in 4.12 where we started smoothing Z location rather than always zeroing it (in certain movement modes).
#udn https://udn.unrealengine.com/questions/300494/networked-crouching-jitter.html
Change 3032539 on 2016/06/29 by Marc.Audy
Don't destroy AudioDevices before draining audio commands and stopping audio thread
#jira UE-32611
Change 3032633 on 2016/06/29 by Marc.Audy
In the same way that SpawnActor doesn't work during world teardown, don't allow new components to be added which could introduce recursion within the destroy logic.
#jira UE-32574
Change 3032644 on 2016/06/29 by Lina.Halper
- Fixed issue where pose node evaluator doesn't show up in the menu with asset
- it showed twice of pose node (none) - jira UE-32358
- Fixed issue where anim evaluator/pose asset by name/blend space evaluator failed to display assets properly
- jira UE-32359
- support create pose menu from create asset - UE-32596
- added create pose asset from current pose
- update source should refresh list - UE-32576
- fixed blendspace to be in the blendspaces category
Change 3032847 on 2016/06/29 by Tom.Looman
Added PredictProjectilePath and SuggestProjectileVelocity_MediumArc utilities to UGameplayStatics.
Updated SuggestProjectileVelocity to avoid floating point precision errors on gravity value comparison.
#jira UE-32103
Change 3033124 on 2016/06/29 by Jon.Nabozny
Fix issue where InstancedStaticMeshComponent InstanceBodies don't move when the mesh is updated.
#JIRA: UE-13673
Change 3033155 on 2016/06/29 by Lina.Halper
- montage is playing and montage is pure
- made montage parameter to be mostly const (except play), and made it consistently pointer
Change 3033157 on 2016/06/29 by Lina.Halper
Check in missing file
Change 3033456 on 2016/06/29 by Lukasz.Furman
fixed path following changes broken by merge
#ue4
Change 3033956 on 2016/06/30 by bruce.nesbit
PR #2483: Fix/Improvment Move Component To Rotation (Contributed by Nachtmahr87)
#test PIE
Change 3034019 on 2016/06/30 by Benn.Gallagher
Anim blueprint sub-instances, allowing anim blueprints to run within anim blueprints and expose parameters back to the "parent" instance.
Caveats:
- Slots and state machine names are unique and boxed per instance, meaning playing a montage on a slot will only affect slots in the outermost instance and state machine getters are local to their instance.
#jira UEFW-1
Change 3034085 on 2016/06/30 by Benn.Gallagher
Missed LOCTEXT_NAMESPACE undefs from the subinstance checkin, for some reason doesn't get caught on windows, likely how the unity files are stuck together.
Change 3034162 on 2016/06/30 by Martin.Wilson
Refactor bone reference widget so that selection tree can be used seperately
Change 3034205 on 2016/06/30 by Lina.Halper
#ANIM: fix issue with addiitve blending with non-full weight applying wrong scale
#jira: UE-32643, UE-32593
Change 3034339 on 2016/06/30 by James.Golding
Moving functionality from Skeleton Curves tab into Anim Curve Viewer tab
Change 3034426 on 2016/06/30 by Martin.Wilson
CIS Fix
Change 3034629 on 2016/06/30 by Lina.Halper
Support non-zero curves to be stippred out upon importing
Change 3035863 on 2016/07/01 by Marc.Audy
When pasting components in to a blueprint, make the relative position and rotation of the root 0,0,0
#jira UE-31344
Change 3035916 on 2016/07/01 by Jon.Nabozny
Fixed PaperGroupedSprite doesn't update InstanceBodies data in physics. This change is related to CL-3033124
Change 3035973 on 2016/07/01 by Lukasz.Furman
fixed hash function for FRecastDebugPathfindingNode
#ue4
Change 3036024 on 2016/07/01 by Zak.Middleton
#ue4 - Avoid filling in array in AActor::FixupNativeActorComponents() unless we detect a null scene component. Avoid copying TWeakObjectPtr in ValidateDeferredTransformCache().
Change 3036157 on 2016/07/01 by Marc.Audy
Protect against running commands on game thread when the audio device has already been freed
#jira UE-32611
Change 3036178 on 2016/07/01 by Marc.Audy
Don't bitpack the gamethread specific boolean.
Change 3036906 on 2016/07/04 by bruce.nesbit
Fixed a typo in HasDefaultBuildSettings - (bCompi8leLeanAndMeanUE should be bCompileLeanAndMeanUE)
#tests Compiled
Change 3036929 on 2016/07/04 by James.Golding
UE-32405 Label Rotator components X/Y/Z instead of Roll/Pitch/Yaw
Change 3036930 on 2016/07/04 by James.Golding
UE-30414 Move constraint warnings to Message Log
Change 3036931 on 2016/07/04 by James.Golding
PR #2427: SkeletalMeshMerge now can transform the UVs of the source meshes. (Contributed by Bogustus)
Change 3037123 on 2016/07/04 by Ori.Cohen
Added physical animation preview in PhAT as well as physical animation profiles.
Change 3037420 on 2016/07/05 by Jurre.deBaare
Moved BodySetup_DEPRECATED out of WITH_EDITORONLY_DATA since it's being used in postload (fixes shipping builds)
#jira UE-32771
Change 3037702 on 2016/07/05 by Thomas.Sarkanen
Copying change 3037701 from Release-4.12:
Fixed crash when viewing uncompressed animation
Made sure that objects required by the animation evaluation are set up when performing game-thread side work in the editor.
#jira UE-32715 - Crash when selecting "show" > "uncompressed animation" in Persona
Change 3037837 on 2016/07/05 by Marc.Audy
sound stats will now still be displayed when creating a new audio device
#jira UE-32743
[CL 3038035 by Marc Audy in Main branch]
2016-07-05 14:25:57 -04:00
Volume * = AudioDevice - > GetPlatformAudioHeadroom ( ) ;
2015-05-30 15:05:31 -04:00
Volume = FMath : : Clamp ( Volume , 0.0f , MAX_VOLUME ) ;
2014-05-29 17:45:17 -04:00
2015-05-29 15:01:29 -04:00
const float Pitch = FMath : : Clamp < float > ( WaveInstance - > Pitch , MIN_PITCH , MAX_PITCH ) ;
2014-05-22 17:20:22 -04:00
// Set whether to apply reverb
SetReverbApplied ( true ) ;
Copying //UE4/Dev-Framework to //UE4/Main @ 2775446
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2720537 on 2015/10/07 by Aaron.McLeran
Audio Optimization: Implementing an audio update delta time so audio isn't updated with every engine tick
Change 2746582 on 2015/10/29 by Aaron.McLeran
Implementing single ray-cast sound occlusion
- Fixing/Implementing sound occlusion using one ray cast
- Update rate of the ray cast is conifgurable by the user
- User can enabled/disable occlusion and set various properties of the occlusion at the audio component level
- Occlusion ray-casts are made at a slower rate than the audio engine is updated
- The following properties are supported:
* LowPassFilterFrequency (the LPF cutoff frequency of the per-voice filter to apply if a sound is occluded)
* OcclusionVolumeAttenuation (the volume attenuation to apply to sounds that are occluded)
* OcclusionInterpolationTime (how fast a sound moves from occluded to unoccluded... allows user-defined interpolation times, avoids fast parameter setting for smoother transitions)
- Fixed how low-pass filter frequency is applied on platforms that support it.
* Changed the older HighFrequencyGain parameter to a more understandable and correct LowPassFilterFrequency parameter
* Updated the parameter for the various other features that use per-voice LPF (e.g. audio volumes, distance-based filtering)
* Added backward-compatibility code to take old HighFrequencyGain params to new LowPassFilterFrequency params.
* At the lowest level, there is only one filter which is applied to a sound, but the parameter that has the lowest cutoff frequency is the one used
* Fixed how the parameter is applied at the lower-level in XAudio2 and CoreAudio. The old parameter was incorrectly applied.
* XAudio2 documentation on the low-pass-fitler frequency cutoff param is confirmed incorrect through testing.
#rb zak.middleton
Change 2765174 on 2015/11/12 by Aaron.McLeran
UE-23091 More fixage for NaN audio log spam
Last checkin for this (CL 2760896) was fixing a legit issue but there was still an issue that I was rarely catching during the FN gate encounter in AITestbed after about 5 min of gate defense.
To track down, I added a lot more logging and asserts on NaN numbers in the audio code, enabled ENABLE_NAN_DIAGNOSTIC in UnrealMathUtility.h.
- Was able to trace another cause of the NaNs in audio to 2 uninitialized variables in SoundAttenuationSettings struct: OmniRadius and StereoSpread.
- Zak M suggested the change of the const ref position vector in ListenerPosition and the usage of GetSafeNormal() in Audio.cpp since the value returned by GetLocation() is a temporary and Normalize() is unsafe.
- I removed the flag for the XAudio2 call to compute doppler since we don't use that value and it could've been as source of more NaNs in X3DAudioCalculate
#codereview Zak.Middleton
#rb Zak.Middleton
Change 2765467 on 2015/11/13 by James.Golding
- Allow -ms option to work with 'stat dumphitches' for controlling min time logged
#rb gil.gribb
Change 2765746 on 2015/11/13 by Benn.Gallagher
Added buckets for update rate shift tags (for staggering anim updates)
#jira UE-23213
#rb Bruce.Nesbit
Change 2765747 on 2015/11/13 by Benn.Gallagher
Fixes for bone length calculation in anim dynamics chains.
#rb Bruce.Nesbit
Change 2765749 on 2015/11/13 by Benn.Gallagher
Removed allocations from local CS blends for skeletal controls.
#rb Bruce.Nesbit
Change 2765752 on 2015/11/13 by Benn.Gallagher
Lod mapping support for URO customization
#jira UE-23211
#rb Bruce.Nesbit
Change 2765965 on 2015/11/13 by Marc.Audy
Remove outdated code in LoadMap previously used for matching up downloaded packages from servers. These code paths no longer operate, but in the case where a PIE client was connecting to a non-PIE server (not really supported, but possible), it would cause the Editor Level package to be flagged as as PIE package and cause a crash on exit of PIE
#jira UE-21181
#rb Josh.Markiewicz
Change 2766071 on 2015/11/13 by Mieszko.Zielinski
Fixed dumb mistake in AEQSTestingPawn::PostLoad #UE4
the 'bTickDuringGame == bTickDuringGame' thing
#rb John.Abercrombie
Change 2766086 on 2015/11/13 by Mieszko.Zielinski
Exposing NavModifierComponent to ENGINE_API #UE4
#codereview Lukasz.Furman
Change 2766345 on 2015/11/13 by Mieszko.Zielinski
No longer compiling AISystem's creation out from client builds #UE4
Instead AISystem's instantiation on clients is configurable via UAISystemBase::bInstantiateAISystemOnClient config variable
Change 2766346 on 2015/11/13 by Mieszko.Zielinski
Improvements to EQS test scoring function preview #UE4
#rb Lukasz.Furman
Change 2766528 on 2015/11/13 by Stan.Melax
multiple materials/chunks on a single cloth sim mesh
This supposedly used to work in 4.7 but broke for 4.8
It looks like previous change 2493547 may have introduced the condition statement that makes multiple materials not include all of there verts.
Changing this to instead check for the bounds on the skinningmap instead of the NumRealSimVerts which doesn't look like it takes the offset into consideration.
jira:
#UE-23300
https://jira.ol.epicgames.net/browse/UE-23300
https://answers.unrealengine.com/questions/287833/apex-not-working-on-multiple-materials-since-48.html
Double tested code change with test asset from https://jira.ol.epicgames.net/browse/UE-10674
#rb Benn.Gallagher
Change 2766546 on 2015/11/13 by Marc.Audy
Throw warning for orphaned looping sounds caused by a looping sound node
Don't do somewhat expensive (due to weak pointer) orphaned sound checks in test or shipping
#rb Aaron.McLeran
Change 2766917 on 2015/11/14 by Jurre.deBaare
Fix UE4-23349 Simplygon doens't support sub 64 pixel textures
Change 2767742 on 2015/11/16 by Marc.Audy
Restructure SignificanceManager to store significance manager references in a FGCObject Module class instead of using a singleton.
Improve performance by eliminating StaticFindObjectFast calls in ::Get and force inlining Get calls
#rb Zak.Middleton, Rob.Manuszewski
Change 2767827 on 2015/11/16 by Zak.Middleton
#ue4 - Perf: avoid SmoothClientPosition() calls once the target mesh offset has been reached.
- New flag bNetworkSmoothingComplete indicates whether smoothing has reached the destination. This is set to false when a new network position is received.
- Also fixes trying to smooth rotation towards identity rotation before receiving network updates.
- Deprecated FNetworkPredictionData_Client_Character::CurrentSmoothTime in favor of saving last update time, to prevent needing to update time every tick (since we skip updates now).
#rb Dan.Youhon
Change 2768070 on 2015/11/16 by Marc.Audy
Change StaticDuplicateObject and DuplicateObject to take FName instead of char* (existing usages can automatically convert to FName so no backwards compatibility issues)
Fixup usages to avoid unnecessary string -> char* -> name conversions
Change AActor::CreateComponentFromTemplate to take an FName instead of FString, deprecated FString version
#rb Gil.Gribb
Change 2768121 on 2015/11/16 by Marc.Audy
Forceinline GetFName
Change 2768161 on 2015/11/16 by Aaron.McLeran
Checking occlusion back in
- Bug was due to improper interpolation of LPFFrequency values in audio volumes.
Change 2769428 on 2015/11/17 by Thomas.Sarkanen
Fixed backwards-compatibility issues with FExposedValueCopyRecord
Added PostSerialize function to patch up older data to the new format (copies properties->property FNames).
Made sure to zero FExposedValueCopyRecord in its constructor, prevents uninitialized variable issues when generating CRCs. This is necessary despite these members being UPROPERTYs because they are simply built on the stack then stuffed into the new CDO during compilation.
UE-23268 - EDITOR CRASH: Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter())
#rb James.Golding
#codereview Mike.Beach,Bob.Tellez
Change 2769488 on 2015/11/17 by Benn.Gallagher
DrawCanvas and debug string support for skeletal controls - accessed using "Skeletal Controls" option in Show->Display Info in Persona
#rb Martin.Wilson
Change 2769545 on 2015/11/17 by Benn.Gallagher
Added space conversion options to copy bone node.
#jira OR-9430
#rb Martin.Wilson
Change 2770228 on 2015/11/17 by Marc.Audy
Fix cause of assert firing when detaching if AttachTo(AttachParent) returns false
#rb Ori.Cohen
#jira UE-23366
Change 2770489 on 2015/11/17 by Marc.Audy
Make ::Serialize WITH_EDITORONLY_DATA since it did nothing otherwise
Change 2770761 on 2015/11/17 by Aaron.McLeran
Removing optimization disablement
- Forgot to remove these lines before checking in/testing.
Change 2771375 on 2015/11/18 by Thomas.Sarkanen
Added initialzation of internal state machine desc ptrs to (finally) remove random crashes when using sub-state machines
#rb Benn.Gallagher
Change 2771697 on 2015/11/18 by Jeff.Farris
Sensible defaults for APlayerController::ClientPlayCameraAnim and ClientPlayCameraShake
#rb marc.audy
Change 2771755 on 2015/11/18 by Marc.Audy
Put back in the recursion block for destroy actor
#rb James.Golding
Change 2772217 on 2015/11/18 by Marc.Audy
Update axis inversion to work the same way as sensitivity instead of old problematic way
Also change to use Reset instead of Empty(Array.Num())
#rb Jeff.Farris
Change 2772686 on 2015/11/18 by Aaron.McLeran
Fixing HRTF spatialization coordinate bug.
Don't need to convert to xaudio2 coordinates for HRTF spatialization
#rb chad.taylor
Change 2772766 on 2015/11/18 by Aaron.McLeran
Fixing HRTF spatialization with xaudio2 voice pools
- Issue was caused by 2 issues:
- effect chains weren't properly clearing their state between uses (SetEffectChain(nullptr) releases the effect for use with other voices)
- Not re-setting MaxEffectChainChannels = 0 in CreateSource() was causing re-used SoundSources to release their XAudio2 voices to the wrong pool.
#rb chad.taylor
Change 2773027 on 2015/11/19 by Thomas.Sarkanen
PR #1765: Git Plugin can find the git.exe binary installed on the Local AppData user directory (Contributed by SRombauts)
#rb Thomas.Sarkanen
Change 2773142 on 2015/11/19 by Benn.Gallagher
Optimized SafeSetCSBoneTransforms, no longer doing 2 iterations over the whole pose.
- Only iterating beyond the index of the first bone transform, cutting off all bones before
- No longer using a bone mask the size of the skeleton, just an array of interesting nodes
- No longer attempting to convert a transform if it isn't necessary (which was happening a lot)
#rb Laurent.Delayen
Change 2773212 on 2015/11/19 by Richard.Hinckley
#jira UEDOC-2685
Removing ugly comment. Not going to remove the node itself for backward compatibility.
Change 2773351 on 2015/11/19 by Zak.Middleton
#orion - Make sure we don't skip a final visual update when character mesh interpolation tries to stop smoothing once it reaches its destination. We keep setting bNetworkSmoothingComplete to false until the first visual update, at which point if it remains true we will stop getting updates.
#rb Dan.Youhon
Change 2773599 on 2015/11/19 by Marc.Audy
Fix shadow variable, initialization order, and incorrect placement of ENGINE_API that fails compiles on clang
#codereview Aaron.McLeran
Change 2773661 on 2015/11/19 by Richard.Hinckley
#jira UEDOC-2685
Following up by deprecating the CastToPlayerController function for 4.11.
Change 2774707 on 2015/11/19 by Stan.Melax
FCollisionQueryParams constructor API pitfall
Deprecating something that will call the unintended constructor if the programmer provides a string literal instead of explicitly creating an FName.
So this line of code:
FCollisionQueryParams Param(FName(TEXT("DragDropTrace")));
will invoke:
FCollisionQueryParams::FCollisionQueryParams(FName,bool=false,...)
But this line of code:
FCollisionQueryParams Param(TEXT("DragDropTrace"));
invokes:
FCollisionQueryParams::FCollisionQueryParams(bool)
Yes that actually happens, the string literal (the TEXT("whatever")) ends up specifies a bool parameter instead of a FName parameter. So the name is lost and a flag (that is usually set to false) is now set to true (since the string literal address is non-NULL). Yeah, that's could potentially be not what the programmer had intended.
It looks like this interface was introduced in CL 1792949
back in august 2013. Since its been a couple of years, we'll phase it out using the deprecation approach.
Making an API change would break things for existing projects.
If it had been a more recent change we could have probably just gone down to a single constructor right away.
Figured out that going one step further and removing bool param's default and adding a default constructor would minimize the number of places that will be hit with this deprecation. So, yes this is *increasing* the number of construtors temporarily, but this solution has minimal impact on the community. Later after other to-be-deprecated constructor gets removed, the two remaining can be combined into one with defaults for all parameters.
see also
https://udn.unrealengine.com/questions/269512/dangerous-fcollisionqueryparams-overloads.html
#codereview ori.cohen
[CL 2775460 by Marc Audy in Main branch]
2015-11-20 11:02:37 -05:00
SetFilterFrequency ( ) ;
2014-05-29 17:45:17 -04:00
2014-03-14 14:13:41 -04:00
FVector Location ;
FVector Velocity ;
// See file header for coordinate system explanation.
Location . X = WaveInstance - > Location . X ;
Location . Y = WaveInstance - > Location . Z ; // Z/Y swapped to match UE coordinate system
Location . Z = WaveInstance - > Location . Y ; // Z/Y swapped to match UE coordinate system
Velocity . X = WaveInstance - > Velocity . X ;
Velocity . Y = WaveInstance - > Velocity . Z ; // Z/Y swapped to match UE coordinate system
Velocity . Z = WaveInstance - > Velocity . Y ; // Z/Y swapped to match UE coordinate system
// We're using a relative coordinate system for un- spatialized sounds.
if ( ! WaveInstance - > bUseSpatialization )
{
Location = FVector ( 0.f , 0.f , 0.f ) ;
}
2015-01-20 10:09:11 -05:00
// Set volume (Pitch changes are not supported on current Android platforms!)
2014-03-14 14:13:41 -04:00
// also Location & Velocity
2015-05-29 15:01:29 -04:00
2015-07-13 16:50:26 -04:00
// Avoid doing the log calculation each update by only doing it if the volume changed
if ( Volume ! = VolumePreviousUpdate )
{
VolumePreviousUpdate = Volume ;
static const int64 MinVolumeMillibel = - 12000 ;
if ( Volume > 0.0f )
{
// Convert volume to millibels.
SLmillibel MaxMillibel = 0 ;
( * SL_VolumeInterface ) - > GetMaxVolumeLevel ( SL_VolumeInterface , & MaxMillibel ) ;
SLmillibel VolumeMillibel = ( SLmillibel ) FMath : : Clamp < int64 > ( ( int64 ) ( 2000.0f * log10f ( Volume ) ) , MinVolumeMillibel , ( int64 ) MaxMillibel ) ;
SLresult result = ( * SL_VolumeInterface ) - > SetVolumeLevel ( SL_VolumeInterface , VolumeMillibel ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
}
else
{
SLresult result = ( * SL_VolumeInterface ) - > SetVolumeLevel ( SL_VolumeInterface , MinVolumeMillibel ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
}
}
2015-05-04 17:36:45 -04:00
2014-03-14 14:13:41 -04:00
}
/**
* Plays the current wave instance .
*/
void FSLESSoundSource : : Play ( void )
{
if ( WaveInstance )
{
2015-07-24 19:31:40 -04:00
// Reset the previous volume on play so it can be set at least once in the update function
VolumePreviousUpdate = - 1.0f ;
2015-12-10 16:56:55 -05:00
// Update volume now before starting play
Paused = false ;
Update ( ) ;
2014-03-14 14:13:41 -04:00
// set the player's state to playing
SLresult result = ( * SL_PlayerPlayInterface ) - > SetPlayState ( SL_PlayerPlayInterface , SL_PLAYSTATE_PLAYING ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
Playing = true ;
}
}
/**
* Stops the current wave instance and detaches it from the source .
*/
void FSLESSoundSource : : Stop ( void )
{
if ( WaveInstance )
{
// set the player's state to stopped
SLresult result = ( * SL_PlayerPlayInterface ) - > SetPlayState ( SL_PlayerPlayInterface , SL_PLAYSTATE_STOPPED ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
// Unregister looping callback
if ( WaveInstance - > LoopingMode ! = LOOP_Never )
{
result = ( * SL_PlayerBufferQueue ) - > RegisterCallback ( SL_PlayerBufferQueue , NULL , NULL ) ;
}
DestroyPlayer ( ) ;
ReleaseResources ( ) ;
Paused = false ;
Playing = false ;
Buffer = NULL ;
}
FSoundSource : : Stop ( ) ;
}
/**
* Pauses playback of current wave instance .
*/
void FSLESSoundSource : : Pause ( void )
{
if ( WaveInstance )
{
Paused = true ;
// set the player's state to paused
SLresult result = ( * SL_PlayerPlayInterface ) - > SetPlayState ( SL_PlayerPlayInterface , SL_PLAYSTATE_PAUSED ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
}
}
/**
* Returns TRUE if the source has finished playing
*/
bool FSLESSoundSource : : IsSourceFinished ( void )
{
SLuint32 PlayState ;
// set the player's state to playing
SLresult result = ( * SL_PlayerPlayInterface ) - > GetPlayState ( SL_PlayerPlayInterface , & PlayState ) ;
check ( SL_RESULT_SUCCESS = = result ) ;
if ( PlayState = = SL_PLAYSTATE_STOPPED )
{
return true ;
}
return false ;
}
/**
* Queries the status of the currently associated wave instance .
*
* @ return TRUE if the wave instance / source has finished playback and FALSE if it is
* currently playing or paused .
*/
bool FSLESSoundSource : : IsFinished ( void )
{
if ( WaveInstance )
{
// Check for a non starved, stopped source
if ( IsSourceFinished ( ) )
{
// Notify the wave instance that it has finished playing
WaveInstance - > NotifyFinished ( ) ;
return true ;
}
else
{
if ( bHasLooped )
{
switch ( WaveInstance - > LoopingMode )
{
case LOOP_Forever :
bHasLooped = false ;
break ;
case LOOP_Never :
bBuffersToFlush = true ;
break ;
case LOOP_WithNotification :
bHasLooped = false ;
// Notify the wave instance that it has finished playing.
WaveInstance - > NotifyFinished ( ) ;
break ;
} ;
}
}
return false ;
}
return true ;
}