If using the elgato 1.x.x filter it would not properly set resolution
changes due to intermediary filters. Change to direct connect to
prevent that issue from occurring.
Managed to make it so that the elgatos can change resolutions without
necessarily having to replace the entire subsystem. I almost didn't
think this was doable but I made a workaround to be able to do so.
- Add an option in game capture to use SetWindowsHookEx instead of
CreateRemoteThread to inject the library.
- Add logging of what process game capture is trying to capture.
- Rename "audio time offset" where it was used to "audio sync offset"
- Adde logging for audio sync offsets
- Update version to 0.62b test 1
The entire mono situation is my fault. I did test it and it seemed
like it was working at first when I got the pull request so I said "hey
okay looks good." Unfortunately I was mistaken, so I'm fixing the code
myself.
AAC was taking in stereo audio and was not calculating the timestamps
correctly. Internally OBS still gets data in the form of stereo, so
because this is OBS1 I'm just going to put in this workaround code that
downmixes stereo to mono in to the AAC encoder buffer.
@jp9000
Implement log window
Also made it so that the log window position/size is saved. Defaults to
600x500, centered to the main monitor if no configuration found.
@palana
Log system integration and callback behavior
Changed it so that timestamps do not "reset" if under the expected
value. Seems that doing this prevent a lot of timestamp "jumps" and
allows data to flow far more smoothly, as long as it's within the
expected broundries.
Had to make a ridiculous hack to get more usable variables in the class
without breaking API. It's a totally disgusting hack, but it works.
Replaced the AudioSource::resampler variable to be a pointer to newer
variables. The reason this hack had to be done in the first place is
because I directly exposed data in the base class instead of using a
forward. Forward pointers are always far more safe and prevent API
breakage. This is one thing I really dislike about C++, you modify the
class what so ever and it will break API. I just don't like C++ when
used for libraries, but again I could have avoided it by simply handling
it better, so it was really my fault for having been so careless with it
in the first place.
- Fixed an issue where audio data that came in bursts would cause
desyncs. Basically, if data came in too late, it would continue to
buffer little by little, causing progressive desync with certain
microphones and capture devices (avermedia stream engine for the live
gamer portable especially). Also seemed to happen with HDMI data
from the newer game consoles, like xbox one apparently, though I
can't be too sure.
Now, it queries the mic and auxilary sound sources until sound
buffers are depleted. After doing so, it then "sorts" the audio
packets timestamps backwards from the most recent packet to the
oldest audio packet. By doing this, it compensates for burst, and
ensures that all audio data is seamless. New burst data coming in
will then line up properly with the older data via the sort function.
NOTE: This needs testing
String::operator!=, String::operator==, and String::Compare functions
were all originally functions that returned BOOL. I changed them to
return native 'bool' instead without realizing that it would break the
API. So, sadly, I have to change them back to BOOL to prevent
incompatibilities with existing plugins.