Commit Graph

15 Commits

Author SHA1 Message Date
Matthew Griffin
bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00
Marc Audy
60228ea69e Asynchronous realtime audio decompression/procedural generation (XAudio2, Mac, Android)
[CL 2578892 by Marc Audy in Main branch]
2015-06-05 16:09:35 -04:00
Aaron McLeran
a85d8ba0b5 Fixing android build
- accidentally checked these files in, reverted to previous version

[CL 2488651 by Aaron McLeran in Main branch]
2015-03-23 19:23:09 -04:00
Aaron McLeran
cc689ed400 Integrating Oculus Audio SDK to Main
Original Notes (adapted)

Implementation and Integration of Oculus Audio SDK for VR Audio Spatialization

- Adding new audio extension which wraps the oculus audio sdk and the new XAPO plugin
- Adding new XAPO (Xaudio2 Audio Processing Object) effect for processing mono audio source streams inside the new module
- Added new enumeration which allows users to select which spatialization algorithm to use for spatialized mono sources
- Refactored the regular sound source spatialization/effect in XAudio2 device code to support the new HRTF mono-to-stereo effect
- Designed feature so that if the sound spatialization module isn't used, the spatialization will default to normal spatialization algorithm

Notes on implementation:

- Because the audio engine doesn't bifurcate spatialized vs. non-spatialized sound sources into separate source pools, I had to create up-front the effects for the full number of supported sounds 32). This is because the oculus sdk requires at initialization the total number of sound sources that will be used in the SDK.

- Because the oculus SDK refers to sound source instances by index (into the pre-allocated array of sources set at init), I had to save each sound source's index so that it can be used on the HRTF XAPO effect, and then piped to the oculus SDK inside the UE audio extension.

- The audio engine assumes that mono-sources will be treated a certain way (during send-routing and spatialization). Because this new HRTF effect is effectively turning mono-sources into stereo-sources, some code had to be changed to send/route these audio sources as if they were stereo.

- This implementation is slightly different than the original GDC implementation to better work with multiple audio devices. Each audio device creates an IAudioSpatializationAlgorithm object which contains the oculus HRTF processing contexts.

#codereview Nick.Whiting Marc.Audy

[CL 2488287 by Aaron McLeran in Main branch]
2015-03-23 16:14:54 -04:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Robert Jones
5800659c7e Android audio fixes
- Fixes looping issue with ADPCM samples
- Fixes Android not looping sound cues correctly
- Fixes one shot sound ADPCM problems where sound would get cut early
- Removed Android Audio Device update function - was never called and did nothing anyway so this will improve clarity

Changed ADPCM decompressor so that it uses the same code to decompress a full file as it does when streaming - old code was correct it was just silly have it duplicated.

[CL 2339877 by Robert Jones in Main branch]
2014-10-24 10:55:50 -04:00
Robert Jones
747014db6b Added support to Audio device for Android to check if background music/audio is playing.
[CL 2295167 by Robert Jones in Main branch]
2014-09-12 11:37:24 -04:00
Robert Jones
7fc6cbc209 Changed TEXT("") to FName when checking the audio type
Changed the routine which decides which format so that it only does the compare once and then returns that value for the whole cook.

#codereview Daniel.Lamb, Chris.Babcock

[CL 2262575 by Robert Jones in Main branch]
2014-08-19 11:11:25 -04:00
Robert Jones
566d29dd25 #ttp 334858 Android : Support ADPCM
Added support for ADPCM decoding.
Added 'sound type' information to USoundWave
- Android uses this to detect which type of asset it needs to deal with
Added support for selected encoding type via project settings

#codereview Daniel.Lamb, Chris.Babcock

[CL 2260750 by Robert Jones in Main branch]
2014-08-18 09:13:38 -04:00
Matthew Griffin
c28dea244e Splitting format specific classes out of AudioDecompress.cpp/h
New files added to contain FVorbisAudioInfo and FOpusAudioInfo, added all necessary includes
Added a few more checks for whether the target platform supports audio streaming where appropriate
Moved #define to .h file as it was being used in two .cpp files (working because of unity build)

[CL 2137973 by Matthew Griffin in Main branch]
2014-07-04 09:47:36 -04:00
Matthew Griffin
551379cad2 Fixing issues with SoundWave memory and duplicated variables in some platforms.
Moved most of the contents of FAudioDevice::FreeResource to USoundWave::FreeResources so that we can be sure that all memory is cleared up during teardown.
Removed FreeResource function from some subclasses of audio device, as they weren't doing anything different than the base one.
Also removed ListSounds function from these same classes as that seems to have fallen behind current base class version and isn't used anyway.
Removed platform specific audio buffer storage so that there isn't confusion about which is being used and ensured that casts are used when necessary.
Fixed compile issue with STAT_AudioResourceCreationTime for HTML5.

[CL 2109273 by Matthew Griffin in Main branch]
2014-06-18 10:31:15 -04:00
Jaroslaw Palczynski
ebce413232 UE4 Refactoring. Changed OVERRIDE and FINAL macros to keywords override and final.
[CL 2104397 by Jaroslaw Palczynski in Main branch]
2014-06-13 06:14:46 -04:00
Rene Rivera
5640f93dcd Platform; cleanup OpenSLES audio on audio device teardown to avoid resource leak.
#codereview JJ.Hoesing

[CL 2059183 by Rene Rivera in Main branch]
2014-04-29 21:56:32 -04:00
Matthew Griffin
40695e5258 Allowing Compression Info class to be selected by cooked platform
Moved functions to check for and select Compressed Audio Info class to the audio device as the audio formats are not accessible in cooked builds (and shouldn't really need to be either).

[CL 2057758 by Matthew Griffin in Main branch]
2014-04-28 10:49:16 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00