Commit Graph

13 Commits

Author SHA1 Message Date
Mike Fricker
114458bf0f Clang warning fixes: Fixed missing 'override' specifiers
- Also removed some unreferenced functions that adding 'override' revealed

PR #1002 -- Thank you, Omar007!

[CL 2498415 by Mike Fricker in Main branch]
2015-04-01 07:20:55 -04:00
Josh Adams
56440f0048 - First checkin for the new DesktopTargetPlatform that will be able to cook packages for Windows, Mac, and Linux. So far, cooking on Windows and Mac and run on each other (with -opengl on Windows, since Mac can't currently compile D3D shaders)
[CL 2448658 by Josh Adams in Main branch]
2015-02-17 09:57:44 -05: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
Jaroslaw Palczynski
65ba5d456f TArray documentation and a coupld of methods deprecation.
Changes mostly in Array.h. The changes in other files are only renames for deprecated functions.

[CL 2312616 by Jaroslaw Palczynski in Main branch]
2014-09-29 04:23:44 -04:00
Matthew Griffin
af15224625 Allowing different sample rates for Opus encoding
Choose an Opus compatible sample rate based on the input data and store that rate with the audio so that we know what to decode at.
Also changed the bit rate calculation so that it's more closely related to the original sample rate and number of channels, with the quality determining overall size reduction.

[CL 2223219 by Matthew Griffin in Main branch]
2014-07-18 04:03:22 -04:00
Matthew Griffin
c0d29a957c Multi channel support for Opus
Implemented CookSurround function for AudioFormatOpus, refactoring as much common code from the standard Cook into re-usable functions.
Changed OpusAudioInfo class to use a multistream decoder for all sounds, as 1 and 2 channel sounds can still be decoded by it. Just had to create an array of mappings that would take the internal Opus format and give back PCM data in the order that Unreal expects.
Also made the OpusDecoderWrapper a true wrapper so that you don't have to use any opus functions outside of it and it will not function if WITH_OPUS is not defined.
Added a virtual function to the CompressedAudioInfo interface, to check whether its uncompressed data will be in the Vorbis format. This is to make sure that code currently just checking whether there is a DecompressionState can now be sure that the Vorbis format is being used before routing sound to different speakers.
Made sure that you can't cause any problems by adding or removing a SoundWave from the Audio Streaming Manager more than once. Also rearranged where sounds are added to the manager so that it is only done in one place and it's safe when changing quality triggers recompression/splitting.
Added a global multidimensional array to store all the Vorbis channel orderings as they needed to be used in multiple places.
Added Logging and Memory tracking for the streaming process.

[CL 2217839 by Matthew Griffin in Main branch]
2014-07-15 06:09:13 -04:00
Dmitry Rekman
dbdea559eb [Github] PR 242 (safe changes).
- Code cleanup and minor rearrangement (e.g. variable name changes).
- Additions.
- Case issues fixed.
- Minor fixes (init ordering).

[CL 2172690 by Dmitry Rekman in Main branch]
2014-07-08 00:06:17 -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
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
4e8c93f768 Improving Opus format so that it has unique identifier
Added a text string at the start of the Opus File format to identify that we're dealing with the right kind of data (discovered this could be a problem when testing the Opus format and was passed OGG data in error).
Added error checking for OGG decompression (Read function could get stuck in an infinite loop if the seek function failed - again only discovered while testing Opus but makes it future proof).

[CL 2100197 by Matthew Griffin in Main branch]
2014-06-10 06:27:31 -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
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
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