Commit Graph

8 Commits

Author SHA1 Message Date
Ben Marsh
20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00
Ben Marsh
4ba423868f Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3209340 on 2016/11/23 by Ben.Marsh

	Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.

	Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.

	  * Every header now includes everything it needs to compile.
	        * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
	        * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
	  * Every .cpp file includes its matching .h file first.
	        * This helps validate that each header is including everything it needs to compile.
	  * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
	        * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
	        * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
	  * No engine code explicitly includes a precompiled header any more.
	        * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
	        * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.

	Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.

[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
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
Aaron McLeran
466dcdf6df Unreal Audio WIP
* Restructured sound file reading/writing classes
    - 2 classes: a sound file reader and a sound file writer
    - sound file reader decodes sound file data for supported formats, can read stream directly off disk
    - sound file writer writes to a bulk data buffer, can write for supported formats
* First pass sound file asset manager
    - has target memory usage for loaded sound files
    - flushes unrefed sound files when usage is above threshold
    - flushes sound files that haven't been used above a time threshold (e.g. 30 seconds)
    - supports sync and async loading from disk
    - supports loads from bulk data
    - some tests which simulate randomized real-game load patterns.
    - rewrote tests for batch asset conversion (from X to Y audio formats, including sample rates, see below)
* Implemented a flexible linear-based sample rate converter
    - Can be used for real-time decoding and for sample format conversion
* First pass voice manager
    - supports real and virtual voices and logic to steal real voices based on volume-weighted priority
    - organized to attempt to maximize cache coherency
    - manages messages from main-thread to audio-system thread to update voice params
* Sketches on low level mixer, not yet fully implemented
    - first pass implementation on async sound file decoding for "real" voices
* First pass on thread message system between main/audio threads and audio thread to device thread.
    - plan to switch to "named thread" system used by rendering thread for main->audio system thread communication
* First pass on emitter class
    - listener class not implemented, this is testing creating emitters and passing emitter params to audio system thread
* Couple utility classes useful for thread safe message passing
    - simple lockless single producer/single consumer dynamic queue for message passing
    - multi-producer/multi-consumer dynamic queue for message passing (not used)
    - simple class to check for thread ids to ensure functions are called on correct threads

[CL 2620445 by Aaron McLeran in Main branch]
2015-07-14 13:35:50 -04:00
Aaron McLeran
7809d5d687 UnrealAudio Soundfile encoding and decoding
- Implemented libsndfile soundfile class for encoding and decoding audio files (.wav, .aif, .ogg, .flac)
- Implemented import/export process tasks as async background tasks
- Added testing code to test single-file importing and exporting
- Added testing code to test batch-file importing and exporting
- Add dlls for Win32/Win64/Mac. Tested on Win64 and Mac.

To test file import/export processing, use the AudioTestCommandlet with the following:
-command UnrealEd.AudioTestCommandlet source export [SingleFile/Directory]

Where [SingleFile/Directory] is the full path to either a single audio file or a directory to a folder containing audio assets supported. All files are imported into an internal binary ogg format (I will make it variable import format to test), then immediately exported back to the original format. If a file fails importing due to a file format issue (or some other issue), that issue will be reported in the log and the batch processing will proceed.

The exported file will be exported into the original format and put in a Exported sub-directory of the directory of the given single file or the import directory with "_exported" appended to the name.

[CL 2565979 by Aaron McLeran in Main branch]
2015-05-26 19:29:53 -04:00
Aaron McLeran
5d0f293fdc UnrealAudio - Checkin CoreAudio implementation
- checked in first-pass on CoreAudio (Mac/iOS) implementation of audio device module of new UnrealAudio
- fixed an issue with wrapping phase for sine functions (and thus fixed unit tests)
- changed simple device out unit test to be more simple (pure sine tone on each channel in octaves every second)

[CL 2519686 by Aaron McLeran in Main branch]
2015-04-21 14:56:17 -04:00
Aaron McLeran
afc17a9628 UnrealAudio
- Changing design to not include audio device input in main user callback since there were issues with patching XAudio2 (which doesn't support device input) and Wasapi capture devices when the device sample rates were not exactly the same. I could fix this but its probably not worth the time at the moment. We'll add mic input back into the audio engine in the future, but likely in a different mechanism, perhaps as an audio generator object.

- Fully implemented unreal audio device module for XAudio2

- Added ability to switch which device module to test from the commandlet, now to optionally test a specific module (i.e. flip between Wasapi and XAudio2 on pc), type:

-command UnrealEd.AudioTestCommandlet XAudio2 device all

or:

-command UnrealEd.AudioTestCommandlet Wasapi device all

The default as of this check in is Wasapi, so you can also do the following to test Wasapi:

-command UnrealEd.AudioTestCommandlet device all

Of course, the "in" flavors of tests have been removed since there is no longer support for device input

[CL 2510537 by Aaron McLeran in Main branch]
2015-04-13 13:59:42 -04:00
Aaron McLeran
8f5104f646 Unreal Audio: Low level audio I/O
- First check in for new audio system
- Creation of new UnrealAudio module interface and implementation
- UnrealAudioDevice module interface (for platform-dependent audio device I/O)
- Intialize/Shutdown of new UnrealAudio module

- Windows WASAPI implementation of audio device interface
  - Support for querying audio devices
  - Support for streaming audio from input devices
  - Support for streaming audio to output devices
  - Support for mutliple output channels (up to 7.1 for now)

- Beginnings of XAudio2 implementation of audio device interface

- A bunch of unit tests testing audio input/output streaming

- A commandlet to run said unit tests
  - To run commandlet use "[UE4Editor executable] -command UnrealEd.AudioTestCommandlet [arguments]"
  - arguments to use (and their test) are:
    - "device query"      - Prints out information about every connected audio device
    - "device out"          - Plays a decaying sinusoid in harmonic multiples at different rates on available output channels
    - "device out_fm"    - Plays an FM synthesizer bank with randomized parameters on all available output channels
    - "device out_pan"  - Plays a single noise source (with LFO LP filter) "3D" panning clockwise around output channels
    - "device in"             - Plays mic input into all output channels (simple passthrough)
    - "device in_delay"  - Plays mic input through a multi-tap delay line with random delays through all output channels
    - "device all"            - Runs all the above with 10 seconds for each test

[CL 2501316 by Aaron McLeran in Main branch]
2015-04-03 13:55:09 -04:00