Commit Graph

24 Commits

Author SHA1 Message Date
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Matthew Griffin
e529148280 Added config setting for audio volume when app is unfocused
Removed GVolumeMultiplier and added an equivalent to FApp to contain the code to load the unfocused volume multiplier from config.

UE-4449 - Allow users to choose whether audio can be heard when focus is lost

#codereview Robert.Manuszewski

[CL 2341022 by Matthew Griffin in Main branch]
2014-10-27 08:15:41 -04: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
c8aa685ef4 #ttp 338505 MobileMVP: Audio: Procedural Sound not supported on Android
Updated android audio device/buffers/souce to support creation of procedural data from a sound source. Tested with MOD replay in QA test level.

#codereview daniel.lamb, chris.babcock, dmitry.rekman

[CL 2276233 by Robert Jones in Main branch]
2014-08-28 11:18:51 -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
f92177afd9 Removing more duplicated variables from audio sub classes
Duplicate ResourceID would have caused the same problems in HTML5 and Linux as Android. Other duplications are errors waiting to happen, there are a couple of stats functions that could be using the base class versions and not displaying the correct information.

[CL 2119229 by Matthew Griffin in Main branch]
2014-06-27 05:15:16 -04:00
Chris Babcock
4455fa3638 Removed unneeded ResourceID from FLESSoundbuffer, fixes freed resource issue.
#UE4
#Android

[CL 2114639 by Chris Babcock in Main branch]
2014-06-23 18:56: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
Mikolaj Sieluzycki
b443853e94 CIS fix for Android build.
[CL 2109152 by Mikolaj Sieluzycki in Main branch]
2014-06-18 08:35:46 -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
Matthew Griffin
98a1cdce0f Added Structs to store streamed audio chunks for runtime streaming or in DDC.
Followed pattern set out by texture streaming so that each chunk of audio data resides in its own bulkdata struct. It is currently possible to split audio into chunks when SoundWaves are marked for streaming but there is no way of doing this exposed at present.
Changed the parameters of FAudioDevice::GetRuntimeFormat so that the relevant SoundWave must be passed in, to allow for different formats for individual sounds/streaming options.
USoundWave::FreeResources no longer resets the NumChannels as it is unnecessary and causes sounds to be unable to play after the OGG data is flushed when attempting to switch to OPUS.

[CL 2099012 by Matthew Griffin in Main branch]
2014-06-09 11:13:16 -04:00
Dmitry Rekman
252d5fc7da Audio: do not decompress in realtime if device does not support it.
Fixes TTP #336826 where DTYPE_Realtime soundwaves were silently failing in OpenAL under Linux (and perhaps HTML5, too). May also help other platforms (IOS?) where DTYPE_Realtime is not implemented.

#codereview Matthew.Griffin, Marc.Audy

[CL 2088573 by Dmitry Rekman in Main branch]
2014-05-29 17:45:58 -04:00
Ben Marsh
89668b5397 [INTEGRATE] Everything from 4.2 branch back into main.
[CL 2088526 by Ben Marsh in Main branch]
2014-05-29 17:45:17 -04:00
Rene Rivera
9b8305f4ad Fix assertion on volume setting for Android SLES. Vaolume needed to be capped to device specific capability.
[CL 2083495 by Rene Rivera in Main branch]
2014-05-29 16:53:56 -04:00
Rene Rivera
adf47caa6b Fix audio playback cutting in and out, especially for ambient sounds. Volume was being cut artificially cut to zero below a certain threshold. This removes that cut to bring it on-par with the other platforms. And also syncs the audio source update to mirror other platforms more closely (for example adds missing global volume attenuation).
#ttp 334725
#codereview daniel.lamb

[CL 2082403 by Rene Rivera in Main branch]
2014-05-22 17:20:22 -04:00
Marc Audy
c39edd47c0 Ensure that precaching of a sound completes instead of failing to start for all platforms (not just XAudio done in CL# 2082171)
TTP #335967

[CL 2082177 by Marc Audy in Main branch]
2014-05-22 14:15:18 -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
Marc Audy
f7b7c5f3d4 Partially roll back CL#2056352 - TargetPlatformManager doesn't exist in cooked builds, force Vorbis again for now
#codereview Matthew.Griffin

[CL 2056814 by Marc Audy in Main branch]
2014-04-25 16:46:04 -04:00
Matthew Griffin
fb32e49bba Created Opus audio format for streaming sounds
Added an audio format for Opus, which also required a resampler to make sure that all imported sounds are converted to a compatible sample rate.
Added the speex resampler from the opus tools package to the third party source, including built libraries for windows and mac.
Changed FVorbisAudioInfo so that it inherits from an interface for any kind of compressed audio, which can be used everywhere instead of being wrapped in #WITH_VORBIS.
Added FOpusAudioInfo to decompress Opus data, not sure at this point whether it's only going to be used for streaming audio but works for non-streamed playback.

[CL 2056352 by Matthew Griffin in Main branch]
2014-04-25 08:39:14 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00