Implement volumes for sources

 - Added a volume variable to the obs_source structure and implemented
   functions for manipulating source volume.

 - Added a volume variable to the audio_data structure so that the
   volume will be applied when mixing.
Merge branch 'master' of https://github.com/jp9000/obs-studio
Apply volume before inserting into circular buffer

 - Apply the volume specified with the audio data packet before
   inserting the audio data into the circular buffer.  Added functions
   for multiplying the volume with all the different audio bit depths.
   (Could probably be greatly optmimized later)
fix osx bundle loading of required resources
Use recursive mutex for user sources and displays

 - Using a recursive mutex fixes issues where objects need to enter the
   main libobs sources mutex while already within the mutex in the same
   thread.  Otherwise it would keep getting locked on itself on
   destruction.
Merge branch 'master' of https://github.com/jp9000/obs-studio
add cmake plugin helpers
fix typo in obs_helper.cmake
Add preliminary audio processing

 - Mixing still isn't implemented, but the audio system should be able
   to start up, and mix at least once audio line for the time being.
   Will have to write some test audio sources to verify things are
   working properly, and build the rest of the output functionality.
Merge branch 'master' of https://github.com/jp9000/obs-studio
Reverted previous changes and added a hopeful solution for lack of window realization
A few changes concerning wxGTK.

For one, I added a new member gs_window for future use.
The member is "display" which represents our connection to X11.
Ideally, we should use this specific connection to deal with our Window.
For now, it's disabled. Read comment for more information.

Secondly, wxGTK apparently doesn't map our window in some cases.
This causes the window ID passed to be bad and will stop (or segfault)
our program. This might be related to the first commit above.

For now, all this commit does is realize the window manually.
Cleaned up a bit, reverted API back to normal
Added comments on why some code is disabled
Fixed bug with circlar buffer

 - Circular buffer code wasn't correctly handling the splitting of
   newly placed data segments, the code was untested and turned out to
   just be backwards.  It now copied the data to the back and front of
   the buffer properly.
Added a sinewave audio test source

 - Added a test audio sinewave test source that should just play a sine
   wave of the middle C note.  Using unsigned 8 bit mono to test
   ffmpeg's audio resampler, seems to work pretty good.

 - Fixed a boolean trap in threading.h for the event_init function, it
   now uses enum event_type, which can be EVENT_TYPE_MANUAL or
   EVENT_TYPE_AUTO, to specify whether the event is automatically reset
   or not.

 - Changed display names of test sources to something a little less
   vague.

 - Removed te whole "if timestamp is 0 just use current system time"
   when outputting source audio, if you want to use system time you
   should just use system time yourself.  Using 0 as some sort of
   "indicator" like that just makes things confusing, and prevents you
   from legitimately using 0 as a timestamp for your audio data.
Properly position position mixed audio data

 - Audio data was just being popped to the "front" of the mix buffer, so
   instead it now properly pops into the correct position in the mix
   buffer (proper mixing still needs to be implemented)
Detect audio timestamp jumps and reset timing

 - Often, timestamps will go "back" in time with certain..  terrible
   devices that no one should use.  When this occurs, timing is now
   reset so that the new audio comes in directly after the old audio
   seamlessly.
Account for thread pauses for audio data

 - In the audio I/O code, if there's a pause in the program or its
   threads (especially the audio thread), it'll cause it to sample too
   much data, and increase line->base_timestamp to a potentially higher
   value than the next audio timestamp that may be added to the line.
   This would cause it to crash originally, because it expects audio
   data that is within the designated buffering limit.

   Because that audio data cannot be filled by that data anyway, just
   ignore the audio data until it goes back to the right timing (which
   it will as long as the code that is using the line accounts for its
   current system time)
Clean up code in audio-io.c

Clean up a little bit of code that was unnecessarily nested.  Still a
little squishy but better than it was.