35 Commits

Author SHA1 Message Date
jp9000
027fc33396 More adjustment to new audio code
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.
2014-01-18 21:45:34 -07:00
jp9000
85d40f9252 More adjustments to audio burst compensation hack
- Made is so the burst compensation occurs only when the desktop buffer
   has been fully emptied, otherwise it would mess up the timing.
2014-01-08 08:35:57 -07:00
jp9000
c397784885 Fix broken API QueryAudio
- I needed to change the parameter for my hack, so I'm just going to
   create a new function instead, QueryAudio2.  C++ mangling and API
   breakage makes me most displeased.
2014-01-05 20:26:38 -07:00
jp9000
c042ffc6ac Also account for user-specified delay
- Woops, don't use global audio time for sorting, use the latest audio
   timestamp from that specific device.

 - Also, made it so lastSentTimestamp is only done when data is actually
   used, accidentally put it in the wrong scope.
2014-01-05 17:23:27 -07:00
jp9000
75c6d10aa0 Added audio burst compensation (fix sync)
- 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
2014-01-05 16:58:54 -07:00
jp9000
c2848ff60f reverted audio coefficients, turns out it was the cause of people losing audio 2013-09-29 04:26:20 -07:00
Richard Stanway
5694f717bf Fix newline spam 2013-09-17 18:50:08 +02:00
jp9000
d97fd80cc0 made audio input a bit more lenient about getting new data so it doesn't have to be within a 10ms time frame only 2013-09-09 15:40:58 -07:00
jp9000
3520b15ca4 Allow the option to select sample rate to stream at rather than have it hard coded to 48000hz 2013-09-02 18:40:15 -07:00
Extrems
8b16a48523 Output 48 kHz audio 2013-08-29 11:00:43 -04:00
jp9000
4c002444ac got rid of some pesky whitespace 2013-05-11 17:22:50 -07:00
HomeWorld
8090a2fb00 Removed old settings list 'separator' code and have the separator drawn instead of being an item. 2013-05-08 15:08:52 +03:00
HomeWorld
5d59a0d41a Removed 'experimental' from 7.1 speaker setups log message. 2013-05-05 16:37:36 +03:00
jp9000
2d05e4edd3 reverted to memcpy because Jim apparently didn't do proper testing like he should have 2013-05-03 17:17:45 -07:00
jp9000
14a58b1dc7 0.50.01 - added an extra speaker configuration 2013-04-23 16:46:36 -07:00
jp9000
10f7b113dc made it so boost and volume is applied before sending off to audio filters 2013-04-20 11:00:15 -07:00
jp9000
139a1119fd apply timestamp smoothing to all devices to prevent stuttering/hiccupts 2013-04-18 09:06:15 -07:00
jp9000
78501dacc4 yet more (and hopefully final) audio subsystem fixes 2013-04-16 19:41:55 -07:00
jp9000
eb676b5b6a 0.48.013 - Fixed a few more issues with the audio subsystem 2013-04-10 22:18:52 -07:00
jp9000
f345fc59b8 Made the audio input a little more tolerant on the timing incoming audio packets 2013-04-05 22:56:32 -07:00
jp9000
8d95a1e7ac Made a significant number of adjustments to the audio subsystem that should ensure all extra audio streams play back properly and on time 2013-04-05 16:56:02 -07:00
jp9000
d001f62df0 Removed lower quality audio resampling 2013-04-02 23:00:09 -07:00
ThoNohT
c4c6515783 Only remove one range.
Removing it twice causes invalid range warnings and would lead to negative size lists?
2013-03-07 18:42:28 +01:00
jp9000
291aa13319 removed inline api refs 2013-03-06 03:07:52 -07:00
Lucas Murray
d8cdc635f3 Merge remote-tracking branch 'upstream/master'
Conflicts:
	OBS.rc
	Source/TextOutputSource.cpp
	Source/WindowStuff.cpp
2013-03-05 12:06:41 +08:00
jp9000
490c79a404 manual merge of pull request for issue #126 by lmurry (also known as.. sunforest. ...)
fixed a bug with audio sources
added ability to change outline opacity independently of outline
a minor fix to renaming sources/scenes
2013-03-04 10:03:09 -07:00
Lucas Murray
e0ad266a7b Don't get stuck in an infinite loop of allocating memory 2013-03-04 16:27:21 +08:00
jp9000
675d0c6d6c added an audio filter API 2013-03-03 18:20:38 -07:00
jp9000
672333fa6a Added volume bar to directshow source,
moved the volume controls to OBSApi,
made some minor tweaks to mic audio
2013-02-21 01:42:35 -07:00
jp9000
e2ea43ca93 merging develepment branch. don't kill me! 2013-01-24 20:30:22 -07:00
HomeWorld
9414cf444f Provide a better 2.1(who needs LFE anyway)/4.0/4.1/7.1 to stereo downmix (read the comments) 2013-01-11 19:16:15 +02:00
HomeWorld
15beb4a95f Provide a better 5.1 to stereo downmix (read the comments) 2013-01-11 15:58:46 +02:00
jp9000
31a7fe5957 Fixed some bugs
Made is so you can adjust mic/device audio time while streaming
updated installer script
updated some locale
got rid of audio time calculation completely
2013-01-02 21:29:26 -07:00
jp9000
ab859da2aa fixed some mic sync issues
fixed some potential desktop sync issues
fixed some bad names
fixed more json issues
fixed mp4 file syncing
2012-12-30 14:30:08 -07:00
jp9000
efe771565f capture card audio stuff, audio system adjustments, audio thread adjustments 2012-12-25 09:34:07 -07:00