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]
- 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]
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]
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]
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]